LLDB mainline
lldb_private::python::PythonException Class Reference

#include <PythonDataObjects.h>

Inheritance diagram for lldb_private::python::PythonException:
[legend]

Public Member Functions

const char * toCString () const
 PythonException (const char *caller=nullptr)
void Restore ()
 ~PythonException () override
void log (llvm::raw_ostream &OS) const override
std::error_code convertToErrorCode () const override
bool Matches (PyObject *exc) const
std::string ReadBacktrace () const

Static Public Attributes

static char ID = 0

Private Attributes

PyObject * m_exception_type
PyObject * m_exception
PyObject * m_traceback
PyObject * m_repr_bytes

Detailed Description

Definition at line 647 of file PythonDataObjects.h.

Constructor & Destructor Documentation

◆ PythonException()

PythonException::PythonException ( const char * caller = nullptr)

◆ ~PythonException()

PythonException::~PythonException ( )
override

Definition at line 948 of file PythonDataObjects.cpp.

References m_exception, m_exception_type, m_repr_bytes, and m_traceback.

Member Function Documentation

◆ convertToErrorCode()

std::error_code PythonException::convertToErrorCode ( ) const
override

Definition at line 957 of file PythonDataObjects.cpp.

◆ log()

void PythonException::log ( llvm::raw_ostream & OS) const
override

Definition at line 955 of file PythonDataObjects.cpp.

References lldb_private::OS, and toCString().

Referenced by PythonException().

◆ Matches()

bool PythonException::Matches ( PyObject * exc) const

Definition at line 961 of file PythonDataObjects.cpp.

References m_exception_type.

◆ ReadBacktrace()

std::string PythonException::ReadBacktrace ( ) const

◆ Restore()

void PythonException::Restore ( )

Definition at line 939 of file PythonDataObjects.cpp.

References m_exception, m_exception_type, m_traceback, and toCString().

◆ toCString()

const char * PythonException::toCString ( ) const

Definition at line 909 of file PythonDataObjects.cpp.

References m_repr_bytes.

Referenced by log(), PythonException(), ReadBacktrace(), and Restore().

Member Data Documentation

◆ ID

char PythonException::ID = 0
static

Definition at line 653 of file PythonDataObjects.h.

◆ m_exception

PyObject * lldb_private::python::PythonException::m_exception
private

Definition at line 649 of file PythonDataObjects.h.

Referenced by PythonException(), ReadBacktrace(), Restore(), and ~PythonException().

◆ m_exception_type

PyObject* lldb_private::python::PythonException::m_exception_type
private

◆ m_repr_bytes

PyObject* lldb_private::python::PythonException::m_repr_bytes
private

Definition at line 650 of file PythonDataObjects.h.

Referenced by PythonException(), toCString(), and ~PythonException().

◆ m_traceback

PyObject * lldb_private::python::PythonException::m_traceback
private

Definition at line 649 of file PythonDataObjects.h.

Referenced by PythonException(), ReadBacktrace(), Restore(), and ~PythonException().


The documentation for this class was generated from the following files: