mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
27 lines
521 B
C++
27 lines
521 B
C++
#ifndef ERROR_H
|
|
#define ERROR_H
|
|
#include <QString>
|
|
#include <sstream>
|
|
|
|
// turn an error from the python interpreter into an exception
|
|
void reportPythonError();
|
|
|
|
struct ErrWrapper
|
|
{
|
|
static ErrWrapper & instance();
|
|
|
|
void write(const char * message);
|
|
|
|
void startRecordingExceptionMessage();
|
|
|
|
void stopRecordingExceptionMessage();
|
|
|
|
QString getLastExceptionMessage();
|
|
|
|
std::stringstream buffer;
|
|
bool recordingExceptionMessage;
|
|
std::stringstream lastException;
|
|
};
|
|
|
|
#endif // ERROR_H
|