Notify
from panda3d.core import Notify
- class Notify
Bases:
DTOOL_SUPER_BASE
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.
Inheritance diagram
- __init__(*args, **kwargs)
- clearAssertFailed()
C++ Interface: clear_assert_failed(const Notify self)
- /**
Resets the assert_failed flag that is set whenever an assertion test fails.
See has_assert_failed().
*/
- clearAssertHandler()
C++ Interface: clear_assert_handler(const Notify self)
- /**
Removes the installed assert handler and restores default behavior of
nassertr() and nassertv().
*/
- clear_assert_failed()
C++ Interface: clear_assert_failed(const Notify self)
- /**
Resets the assert_failed flag that is set whenever an assertion test fails.
See has_assert_failed().
*/
- clear_assert_handler()
C++ Interface: clear_assert_handler(const Notify self)
- /**
Removes the installed assert handler and restores default behavior of
nassertr() and nassertv().
*/
- getAssertErrorMessage()
C++ Interface: get_assert_error_message(Notify self)
- /**
Returns the error message that corresponds to the assertion that most
recently failed.
*/
- getCategory()
C++ Interface: get_category(const Notify self, str fullname) get_category(const Notify self, str basename, NotifyCategory parent_category) get_category(const Notify self, str basename, str parent_fullname)
- /**
Finds or creates a new Category given the basename of the category and its
parent in the category hierarchy. The parent pointer may be NULL to
indicate this is a top-level Category.
*/
- /**
Finds or creates a new Category given the basename of the category and the
fullname of its parent. This is another way to create a category when you
don’t have a pointer to its parent handy, but you know the name of its
parent. If the parent Category does not already exist, it will be created.
*/
- /**
Finds or creates a new Category given the fullname of the Category. This
name should be a sequence of colon-separated names of parent Categories,
ending in the basename of this Category, e.g. display:glxdisplay. This is
a shorthand way to define a Category when a pointer to its parent is not
handy.
*/
- getOstreamPtr()
C++ Interface: get_ostream_ptr(Notify self)
- /**
Returns the system-wide ostream for all Notify messages.
*/
- getTopCategory()
C++ Interface: get_top_category(const Notify self)
- /**
Returns the topmost Category in the hierarchy. This may be used to
traverse the hierarchy of available Categories.
*/
- get_assert_error_message()
C++ Interface: get_assert_error_message(Notify self)
- /**
Returns the error message that corresponds to the assertion that most
recently failed.
*/
- get_category()
C++ Interface: get_category(const Notify self, str fullname) get_category(const Notify self, str basename, NotifyCategory parent_category) get_category(const Notify self, str basename, str parent_fullname)
- /**
Finds or creates a new Category given the basename of the category and its
parent in the category hierarchy. The parent pointer may be NULL to
indicate this is a top-level Category.
*/
- /**
Finds or creates a new Category given the basename of the category and the
fullname of its parent. This is another way to create a category when you
don’t have a pointer to its parent handy, but you know the name of its
parent. If the parent Category does not already exist, it will be created.
*/
- /**
Finds or creates a new Category given the fullname of the Category. This
name should be a sequence of colon-separated names of parent Categories,
ending in the basename of this Category, e.g. display:glxdisplay. This is
a shorthand way to define a Category when a pointer to its parent is not
handy.
*/
- get_ostream_ptr()
C++ Interface: get_ostream_ptr(Notify self)
- /**
Returns the system-wide ostream for all Notify messages.
*/
- get_top_category()
C++ Interface: get_top_category(const Notify self)
- /**
Returns the topmost Category in the hierarchy. This may be used to
traverse the hierarchy of available Categories.
*/
- hasAssertFailed()
C++ Interface: has_assert_failed(Notify self)
- /**
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.
*/
- hasAssertHandler()
C++ Interface: has_assert_handler(Notify self)
- /**
Returns true if a user assert handler has been installed, false otherwise.
*/
- has_assert_failed()
C++ Interface: has_assert_failed(Notify self)
- /**
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.
*/
- has_assert_handler()
C++ Interface: has_assert_handler(Notify self)
- /**
Returns true if a user assert handler has been installed, false otherwise.
*/
- null()
C++ Interface: null()
- /**
A convenient way to get an ostream that doesn’t do anything. Returned by
Category::out() when a particular Category and/or Severity is disabled.
*/
- out()
C++ Interface: out() out(int severity)
- /**
A convenient way to get the ostream that should be written to for a Notify-
type message of a particular severity. Also see Category::out() for a
message that is specific to a particular Category.
*/
- /**
A convenient way to get the ostream that should be written to for a Notify-
type message. Also see Category::out() for a message that is specific to a
particular Category.
*/
- ptr()
C++ Interface: ptr()
- /**
Returns the pointer to the global Notify object. There is only one of
these in the world.
*/
- setOstreamPtr()
C++ Interface: set_ostream_ptr(const Notify self, object ostream_ptr, bool delete_later)
- /**
Changes the ostream that all subsequent Notify messages will be written to.
If the previous ostream was set with delete_later = true, this will delete
the previous ostream. If ostream_ptr is NULL, this resets the default to
cerr.
*/
- set_ostream_ptr()
C++ Interface: set_ostream_ptr(const Notify self, object ostream_ptr, bool delete_later)
- /**
Changes the ostream that all subsequent Notify messages will be written to.
If the previous ostream was set with delete_later = true, this will delete
the previous ostream. If ostream_ptr is NULL, this resets the default to
cerr.
*/