1 //===-- UnimplementedError.h ------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_UTILITY_UNIMPLEMENTEDERROR_H
10 #define LLDB_UTILITY_UNIMPLEMENTEDERROR_H
11 
12 #include "llvm/Support/Errc.h"
13 #include "llvm/Support/Error.h"
14 
15 namespace lldb_private {
16 class UnimplementedError : public llvm::ErrorInfo<UnimplementedError> {
17 public:
18   static char ID;
19 
20   void log(llvm::raw_ostream &OS) const override { OS << "Not implemented"; }
21 
22   std::error_code convertToErrorCode() const override {
23     return llvm::errc::not_supported;
24   };
25 };
26 } // namespace lldb_private
27 
28 #endif // LLDB_UTILITY_UNIMPLEMENTEDERROR_H
29