Class sh::exceptions::Exception¶
-
class
sh::exceptions
::
Exception
¶ Shallot exception base class. Also contains some static methods for general work with exceptions.
Subclassed by sh::exceptions::ProgramException, sh::exceptions::RuntimeException, sh::scripting::ScriptingEngine::ScriptedException
Public Functions
-
QString
message
() const¶
-
QString
name
() const¶
-
QString
classes
() const¶
-
QString
details
() const¶
-
QString
callstack
() const¶
-
QString
auxiliary
() const¶
-
QString
customValue
(QString key) const¶
-
bool
isRuntimeException
() const¶
-
bool
isProgramException
() const¶
-
bool
isRetryable
() const¶
-
bool
isResumeable
() const¶
-
bool
isDetailsAreInteresting
() const¶
-
int
autoRetryRecommendedIn
() const¶
-
void
setResumeable
(bool v)¶
-
void
setReTryable
(bool v)¶
-
void
setCustomValue
(QString key, QString value)¶
-
bool
isClass
(QString classname)¶
-
Exception
(ExceptionData data)¶
-
Exception
()¶
-
sh::exceptions::ExceptionData
data
()¶
Public Static Functions
-
void
executeGuarded
(std::function<void()> fctint flags = 0, )¶ Executes some code with some standard exection handling around.
- Parameters
fct
: The code to execute guarded.flags
: Flags of ExecuteGuardFlag for choosing the behavior.
-
void
executeGuarded_errorpanel
(std::function<void()> fctint flags = 0, )¶
-
QString
_demangle
(QString l)¶
-
void
exceptionDialog
(sh::exceptions::Exception &e, bool *doRetry)¶
Public Static Attributes
-
const QString
UNDEFINED_ERROR_OCCURRED
= QObject::tr("An unspecified error occurred.")¶
-
const QString
SHALLOT_MUST_CLOSE_TEXT
= QObject::tr("Your Shallot process is disturbed by an error and needs to be closed now. You can try if starting Shallot again solves the issue. If you are interested in technical details, please take a look at the log.")¶
-
const QString
Value_isShallotException
= "_isShallotException"¶
Private Static Functions
-
void
exceptionDialog
(QString error1, QString error2, QString details, QString icon, bool mayRetry, bool mayClose, bool mayCancel, bool showLoglabelAndDetails, bool *doRetry)¶
-
class
HandlerSettings
¶ Public Members
-
QString
cancelText
¶
-
QStack<std::function<bool(sh::exceptions::Exception&)>>
exceptionHandler_retryable
¶
-
QStack<std::function<void(sh::exceptions::Exception&)>>
exceptionHandler_resumeable
¶
-
QStack<std::function<void(sh::exceptions::Exception&)>>
exceptionHandler_hard
¶
-
QStack<std::function<void()>>
exceptionHandler_cancel
¶
Private Functions
-
HandlerSettings
()¶
Friends
- friend class ExceptionHandlerSettingsManager
-
QString
-
template<class
Handler
>
classRegisterHandler
¶
-
QString