#include <Exceptions.h>
Public Member Functions | |
| ExceptionStringHelper ()=delete | |
| activities default to NULLOPT - meaning "not specified" - which is different from "specified,
and there were none". | |
| nonvirtual Characters::String | GetBasicErrorMessage () const |
| nonvirtual Characters::String | GetFullErrorMessage () const |
| nonvirtual optional< Containers::Stack< Activity<> > > | GetActivities () const |
| nonvirtual void | ImbueActivities (const optional< Containers::Stack< Activity<> > > &activities) |
| Set, replace, or clear the activity stack. Any already-computed message text is discarded, since it depends on these. | |
| template<typename T > | |
| nonvirtual T | As () const |
Protected Member Functions | |
| nonvirtual const char * | _PeekAtNarrowSDKString () const |
This is a base class for Execution::Exception<> template, which gets mixed with the std c++ exception class, to mix in Stroika string support.
This probably should NOT be used directly.
Definition at line 64 of file Exceptions.h.
|
delete |
activities default to NULLOPT - meaning "not specified" - which is different from "specified, and there were none".
Nothing is captured at construction.
static const) reports the context of each throw rather than freezing the first one.Pass them explicitly here, or
| Characters::String Stroika::Foundation::Execution::ExceptionStringHelper::GetBasicErrorMessage | ( | ) | const |
Return error message without added 'activities'.
Definition at line 37 of file Exceptions.inl.
| Characters::String Stroika::Foundation::Execution::ExceptionStringHelper::GetFullErrorMessage | ( | ) | const |
Return error message with added 'activities'
Definition at line 41 of file Exceptions.inl.
| optional< Containers::Stack< Activity<> > > Stroika::Foundation::Execution::ExceptionStringHelper::GetActivities | ( | ) | const |
Return the activity stack from when the exception was thrown. NOTE - see @Activity<>. This has little todo with the thread runtime stack. It refers to a logical stack of declared Activity<> objects.
Definition at line 46 of file Exceptions.inl.
| void ExceptionStringHelper::ImbueActivities | ( | const optional< Containers::Stack< Activity<> > > & | activities | ) |
Set, replace, or clear the activity stack. Any already-computed message text is discarded, since it depends on these.
Takes an optional for symmetry with the constructor and
Definition at line 93 of file Exceptions.cpp.
| nonvirtual T Stroika::Foundation::Execution::ExceptionStringHelper::As | ( | ) | const |
Only implemented for o wstring o String
This returns the message callers should display to represent the error (e.g. in exception::c_str ()). For now, it returns GetFullErrorMessage () - but may someday change.
|
protected |
In order for subclasses to support the c++ exception::c_str () API, we need to convert the string/message to an SDKChar string, and have that lifetime be very long. So we store it in a std::string. And this function returns the pointer to that string. This object is immutable, so that the lifetime of the underlying return const char* is as long as this object.
Definition at line 62 of file Exceptions.inl.