LLDB
mainline
llvm-project
lldb
include
lldb
Utility
UnimplementedError.h
Go to the documentation of this file.
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
std::string
m_message
;
18
19
public
:
20
static
char
ID
;
21
22
UnimplementedError
() =
default
;
23
explicit
UnimplementedError
(std::string message)
24
:
m_message
(std::move(message)) {}
25
26
void
log
(llvm::raw_ostream &
OS
)
const override
{
27
if
(!
m_message
.empty())
28
OS
<<
m_message
;
29
else
30
OS
<<
"Not implemented"
;
31
}
32
33
std::error_code
convertToErrorCode
()
const override
{
34
return
llvm::errc::not_supported;
35
};
36
};
37
}
// namespace lldb_private
38
39
#endif
// LLDB_UTILITY_UNIMPLEMENTEDERROR_H
lldb_private::UnimplementedError::convertToErrorCode
std::error_code convertToErrorCode() const override
Definition
UnimplementedError.h:33
lldb_private::UnimplementedError::UnimplementedError
UnimplementedError()=default
lldb_private::UnimplementedError::ID
static char ID
Definition
UnimplementedError.h:20
lldb_private::UnimplementedError::m_message
std::string m_message
Definition
UnimplementedError.h:17
lldb_private::UnimplementedError::log
void log(llvm::raw_ostream &OS) const override
Definition
UnimplementedError.h:26
lldb_private::UnimplementedError::UnimplementedError
UnimplementedError(std::string message)
Definition
UnimplementedError.h:23
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb_private::LLDBLog::OS
@ OS
Definition
LLDBLog.h:36
Generated on
for LLDB by
1.14.0