#include <Exceptions.h>
Public Member Functions | |
ExceptionStringHelper ()=delete | |
nonvirtual Characters::String | GetBasicErrorMessage () const |
nonvirtual Characters::String | GetFullErrorMessage () const |
nonvirtual Containers::Stack< Activity<> > | GetActivities () const |
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 62 of file Exceptions.h.
|
delete |
If the current activities are NOT provided explicitly, they are copied from Execution::CaptureCurrentActivities ().
Characters::String Stroika::Foundation::Execution::ExceptionStringHelper::GetBasicErrorMessage | ( | ) | const |
Return error message without added 'activities'.
Definition at line 31 of file Exceptions.inl.
Characters::String Stroika::Foundation::Execution::ExceptionStringHelper::GetFullErrorMessage | ( | ) | const |
Return error message with added 'activities'
Definition at line 35 of file Exceptions.inl.
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 39 of file Exceptions.inl.
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 53 of file Exceptions.inl.