Panda3D
|
An object that handles general error reporting to the user. It contains a pointer to an ostream, initially cerr, which can be reset at will to point to different output devices, according to the needs of the application. All output generated within Panda should vector through the Notify ostream. More...
Public Member Functions | |
__init__ () | |
clearAssertFailed () | |
Resets the assert_failed flag that is set whenever an assertion test fails. See has_assert_failed(). More... | |
clearAssertHandler () | |
str | getAssertErrorMessage () |
Returns the error message that corresponds to the assertion that most recently failed. More... | |
getAssertHandler () | |
NotifyCategory | getCategory (str fullname) |
NotifyCategory | getCategory (str basename, NotifyCategory parent_category) |
NotifyCategory | getCategory (str basename, str parent_fullname) |
Ostream | getOstreamPtr () |
NotifyCategory | getTopCategory () |
bool | hasAssertFailed () |
Returns true if an assertion test has failed (and not been ignored) since the last call to clear_assert_failed(). More... | |
bool | hasAssertHandler () |
setOstreamPtr (Ostream ostream_ptr, bool delete_later) | |
Static Public Member Functions | |
static Ostream | null () |
static Ostream | out () |
static Notify | ptr () |
static | writeString (str str) |
An object that handles general error reporting to the user. It contains a pointer to an ostream, initially cerr, which can be reset at will to point to different output devices, according to the needs of the application. All output generated within Panda should vector through the Notify ostream.
This also includes a collection of Categories and Severities, which may be independently enabled or disabled, so that error messages may be squelched or respected according to the wishes of the user.
__init__ | ( | ) |
clearAssertFailed | ( | ) |
Resets the assert_failed flag that is set whenever an assertion test fails. See has_assert_failed().
clearAssertHandler | ( | ) |
str getAssertErrorMessage | ( | ) |
Returns the error message that corresponds to the assertion that most recently failed.
getAssertHandler | ( | ) |
NotifyCategory getCategory | ( | str | fullname | ) |
NotifyCategory getCategory | ( | str | basename, |
NotifyCategory | parent_category | ||
) |
NotifyCategory getCategory | ( | str | basename, |
str | parent_fullname | ||
) |
Ostream getOstreamPtr | ( | ) |
NotifyCategory getTopCategory | ( | ) |
bool hasAssertFailed | ( | ) |
Returns true if an assertion test has failed (and not been ignored) since the last call to clear_assert_failed().
When an assertion test fails, the assert handler may decide either to abort, return, or ignore the assertion. Naturally, if it decides to abort, this flag is irrelevant. If it chooses to ignore the assertion, the flag is not set. However, if the assert handler chooses to return out of the function (the normal case), it will also set this flag to indicate that an assertion failure has occurred.
This will also be the behavior in the absence of a user-defined assert handler.
bool hasAssertHandler | ( | ) |
|
static |
|
static |
|
static |
setOstreamPtr | ( | Ostream | ostream_ptr, |
bool | delete_later | ||
) |
|
static |