PCL
|
A Win32 structured exception handler that throws C++ exceptions. More...
#include <Win32Exception.h>
Public Types | |
using | exception_address = const void * |
using | exception_code = unsigned |
using | exception_data_pointer = const void * |
Public Member Functions | |
Win32Exception (const Win32Exception &)=default | |
Win32Exception (exception_code code, exception_data_pointer data, const IsoString &details=IsoString()) | |
String | Caption () const override |
const IsoString & | Details () const |
exception_address | ExceptionAddress () const |
exception_code | ExceptionCode () const |
String | FormatInfo () const override |
String | Message () const override |
void | Show () const override |
Public Member Functions inherited from pcl::Exception | |
Exception ()=default | |
Exception (const pcl::Exception &)=default | |
virtual | ~Exception () |
virtual String | ExceptionClass () const |
PCL_FORCE_INLINE void | ShowOnConsole () const |
Static Public Member Functions | |
static void | Initialize () |
Static Public Member Functions inherited from pcl::Exception | |
static void | DisableConsoleOutput (bool disable=true) |
static void | DisableGUIOutput (bool disable=true) |
static void | EnableConsoleOutput (bool=true) |
static void | EnableGUIOutput (bool=true) |
static bool | IsConsoleOutputEnabled () |
static bool | IsGUIOutputEnabled () |
This class can only be used on Microsoft Windows platforms. On the rest of supported platforms, including this header file from compilable code raises a compiler error.
For this handler to work properly, all code that may raise asynchronous (structured) exceptions must be compiled with the '-EHa' Visual C/C++ compiler option. Otherwise no asynchronous exception thrown in a try{} block will be caught by the corresponding catch{} block, and the program will terminate.
Definition at line 84 of file Win32Exception.h.
using pcl::Win32Exception::exception_address = const void* |
Represents a memory address associated with an exception. For example, the address that has been accessed to cause an access violation error.
Definition at line 92 of file Win32Exception.h.
using pcl::Win32Exception::exception_code = unsigned |
The type of an exception error code.
Definition at line 103 of file Win32Exception.h.
using pcl::Win32Exception::exception_data_pointer = const void* |
Represents a pointer to a data block that describes an exception. This is an opaque pointer to an EXCEPTION_RECORD structure.
Definition at line 98 of file Win32Exception.h.
|
inline |
Constructs a new Win32Exception object with the specified exception code and data, plus optional backtrace information details.
Definition at line 109 of file Win32Exception.h.
|
default |
Copy constructor.
|
inlineoverridevirtual |
Returns the type of this exception, intended to be used as a caption for a message box. As reimplemented in this class, this member function returns the string "PCL Win32 System Exception".
Reimplemented from pcl::Exception.
Definition at line 177 of file Win32Exception.h.
|
inline |
Returns the backtrace information associated with this exception.
The returned string will be empty if no backtrace data were available at the time this exception was generated.
Definition at line 141 of file Win32Exception.h.
exception_address pcl::Win32Exception::ExceptionAddress | ( | ) | const |
Returns the memory address associated with this exception.
|
inline |
Returns the error code of this exception.
Definition at line 130 of file Win32Exception.h.
|
inlineoverridevirtual |
Returns a formatted error message with information on this exception.
Reimplemented from pcl::Exception.
Definition at line 160 of file Win32Exception.h.
|
static |
Initializes the structured exception handler. This static member function must be called before the calling process can raise any system exception.
|
inlineoverridevirtual |
Returns an error or warning message corresponding to this exception. For example, some typical messages are "access violation", "stack overflow" and "illegal instruction", returned by specific derived classes.
Reimplemented from pcl::Exception.
Definition at line 152 of file Win32Exception.h.
|
overridevirtual |
Writes a formatted representation of this exception on the platform console. A plain text version of the same textual representation will also be written on stdout; however, if there is no console currently attached to the process (which is the typical situation for GUI Windows applications), no console stream output will be generated.
Reimplemented from pcl::Exception.