diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 21:59:52 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 21:59:52 +0000 |
| commit | 435933dd67752b0d68c320107a5e69435a6f20ec (patch) | |
| tree | d6d182de35e23e0da238fad40b066bab6a712352 /contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h | |
| parent | 1189dbaa8c30085bd4f9cc7759a459160bcf2375 (diff) | |
| parent | 14f1b3e8826ce43b978db93a62d1166055db5394 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h')
| -rw-r--r-- | contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h | 55 |
1 files changed, 21 insertions, 34 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h b/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h index c74e52b9ef56..20f4b4c6329d 100644 --- a/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h +++ b/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h @@ -14,54 +14,41 @@ #include "PythonDataObjects.h" -namespace lldb_private -{ +namespace lldb_private { -class PythonExceptionState -{ - public: - explicit PythonExceptionState(bool restore_on_exit); - ~PythonExceptionState(); +class PythonExceptionState { +public: + explicit PythonExceptionState(bool restore_on_exit); + ~PythonExceptionState(); - void - Acquire(bool restore_on_exit); + void Acquire(bool restore_on_exit); - void - Restore(); + void Restore(); - void - Discard(); + void Discard(); - void - Reset(); + void Reset(); - static bool - HasErrorOccurred(); + static bool HasErrorOccurred(); - bool - IsError() const; + bool IsError() const; - PythonObject - GetType() const; + PythonObject GetType() const; - PythonObject - GetValue() const; + PythonObject GetValue() const; - PythonObject - GetTraceback() const; + PythonObject GetTraceback() const; - std::string - Format() const; + std::string Format() const; - private: - std::string - ReadBacktrace() const; +private: + std::string ReadBacktrace() const; - bool m_restore_on_exit; + bool m_restore_on_exit; - PythonObject m_type; - PythonObject m_value; - PythonObject m_traceback; + PythonObject m_type; + PythonObject m_value; + PythonObject m_traceback; }; } |
