Describes an exception. More...
Public Member Functions | |
DLL_PACLIENT | ExceptionInfo () |
Create an empty ExceptionInfo instance. More... | |
DLL_PACLIENT | ~ExceptionInfo () |
Dispose of a ExceptionInfo instance. More... | |
DLL_PACLIENT ExceptionInfo & | Caught () |
The exception being described was caught by the application. More... | |
DLL_PACLIENT ExceptionInfo & | Caught (const std::exception &exception) |
Populate the instance using the provided caught exception. More... | |
DLL_PACLIENT ExceptionInfo & | Comment (const wchar_t *comment) |
Set the user provided comment. More... | |
DLL_PACLIENT ExceptionInfo & | Contact (const wchar_t *contact) |
Set the user contact information. More... | |
DLL_PACLIENT int | GetEventType () const |
Get the event type. More... | |
DLL_PACLIENT const wchar_t * | GetEventTypeString () const |
Get the even type as a string. More... | |
DLL_PACLIENT const wchar_t * | GetMessage () const |
Get the message associated with the exception. More... | |
DLL_PACLIENT const wchar_t * | GetType () const |
Get the type or class of the exception being described. More... | |
DLL_PACLIENT const wchar_t * | GetUserComment () const |
Get the user provided comment. More... | |
DLL_PACLIENT const wchar_t * | GetUserContact () const |
Get the user contact information. More... | |
DLL_PACLIENT ExceptionInfo & | Message (const wchar_t *message) |
Set the message associated with the exception. More... | |
DLL_PACLIENT ExceptionInfo & | operator= (const ExceptionInfo *other) |
Assign the values of another instance to this instance. More... | |
DLL_PACLIENT void | SetEventType (int eventType) |
Set the event type of the exception being described. More... | |
DLL_PACLIENT void | SetMessage (const wchar_t *message) |
Set the message associated with the exception. More... | |
DLL_PACLIENT void | SetType (const wchar_t *type) |
Set the type or class of the exception being described. More... | |
DLL_PACLIENT void | SetUserComment (const wchar_t *comment) |
Set the user provided comment. More... | |
DLL_PACLIENT void | SetUserContact (const wchar_t *contact) |
Set the user contact information. More... | |
DLL_PACLIENT ExceptionInfo & | Thrown () |
The exception being described is about to be thrown by the application. More... | |
DLL_PACLIENT ExceptionInfo & | Thrown (const std::exception &exception) |
Propulate the instance using the provided exception that is about to be thrown. More... | |
DLL_PACLIENT ExceptionInfo & | Type (const wchar_t *type) |
Set the type or class of the exception being described. More... | |
DLL_PACLIENT ExceptionInfo & | Uncaught () |
The exception being described was not handled by the application. This is typically used for exceptions received at a global level. More... | |
DLL_PACLIENT ExceptionInfo & | Uncaught (const std::exception &exception) |
Populate the instance using the provided unhandled exception. More... | |
Static Public Attributes | |
static DLL_PACLIENT const int | EVENT_CAUGHT |
The exception being described was caught by the application. More... | |
static DLL_PACLIENT const int | EVENT_THROWN |
The exception being described is about to be thrown by the application. More... | |
static DLL_PACLIENT const int | EVENT_UNCAUGHT |
The exception being described was not handled by the application. This is typically used for exceptions received at a global level. More... | |
Describes an exception.
ExceptionInfo exp;
exp.SetMessage("A bad thing happened");
exp.SetUserComment(GetComments());
exp.SetUserContact(GetEmailAddress());
PAClient::ReportException(exp);
ExceptionInfo exp;
exp.Message("A bad thing happened").Comment(GetComments()).Contact(GetEmailAddress());
PAClient::ReportException(exp);
std::exception
:
catch(std::exception& e)
{
ExceptionInfo exp;
PAClient::ReportException(exp.Caught(e));
}
DLL_PACLIENT ExceptionInfo::ExceptionInfo | ( | ) |
Create an empty ExceptionInfo instance.
EVENT_CAUGHT
DLL_PACLIENT ExceptionInfo::~ExceptionInfo | ( | ) |
Dispose of a ExceptionInfo instance.
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Caught | ( | ) |
The exception being described was caught by the application.
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Caught | ( | const std::exception & | exception | ) |
Populate the instance using the provided caught exception.
exception | the exception was caught |
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Comment | ( | const wchar_t * | comment | ) |
Set the user provided comment.
comment | the user provide comment |
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Contact | ( | const wchar_t * | contact | ) |
Set the user contact information.
contact | user provided contact information such as a customer name, email, phone number, etc. |
DLL_PACLIENT int ExceptionInfo::GetEventType | ( | ) | const |
DLL_PACLIENT const wchar_t* ExceptionInfo::GetEventTypeString | ( | ) | const |
Get the even type as a string.
caught
; uncaught
; thrown
DLL_PACLIENT const wchar_t* ExceptionInfo::GetMessage | ( | ) | const |
Get the message associated with the exception.
DLL_PACLIENT const wchar_t* ExceptionInfo::GetType | ( | ) | const |
Get the type or class of the exception being described.
DLL_PACLIENT const wchar_t* ExceptionInfo::GetUserComment | ( | ) | const |
Get the user provided comment.
DLL_PACLIENT const wchar_t* ExceptionInfo::GetUserContact | ( | ) | const |
Get the user contact information.
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Message | ( | const wchar_t * | message | ) |
Set the message associated with the exception.
message | the message string associated with the exception. |
DLL_PACLIENT ExceptionInfo& ExceptionInfo::operator= | ( | const ExceptionInfo * | other | ) |
Assign the values of another instance to this instance.
other | the instance whos values are being assigned to this instance. If null then this instance is defaulted to its original state. |
DLL_PACLIENT void ExceptionInfo::SetEventType | ( | int | eventType | ) |
Set the event type of the exception being described.
eventType | the type of the event |
DLL_PACLIENT void ExceptionInfo::SetMessage | ( | const wchar_t * | message | ) |
Set the message associated with the exception.
exception::what()
message | the message string associated with the exception. |
DLL_PACLIENT void ExceptionInfo::SetType | ( | const wchar_t * | type | ) |
Set the type or class of the exception being described.
type | typically the name of the exception class |
DLL_PACLIENT void ExceptionInfo::SetUserComment | ( | const wchar_t * | comment | ) |
Set the user provided comment.
comment | the user provide comment |
DLL_PACLIENT void ExceptionInfo::SetUserContact | ( | const wchar_t * | contact | ) |
Set the user contact information.
contact | user provided contact information such as a customer name, email, phone number, etc. |
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Thrown | ( | ) |
The exception being described is about to be thrown by the application.
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Thrown | ( | const std::exception & | exception | ) |
Propulate the instance using the provided exception that is about to be thrown.
exception | the exception being thrown |
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Type | ( | const wchar_t * | type | ) |
Set the type or class of the exception being described.
type | typically the name of the exception class |
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Uncaught | ( | ) |
The exception being described was not handled by the application. This is typically used for exceptions received at a global level.
DLL_PACLIENT ExceptionInfo& ExceptionInfo::Uncaught | ( | const std::exception & | exception | ) |
Populate the instance using the provided unhandled exception.
exception | the exception that was not handled |
|
static |
The exception being described was caught by the application.
|
static |
The exception being described is about to be thrown by the application.
|
static |
The exception being described was not handled by the application. This is typically used for exceptions received at a global level.