|
ubit
|
Error management. More...
#include <uappli.hpp>
Public Member Functions | |
| UErrorHandler (const UStr &label, std::ostream *out_stream=&std::cerr) | |
| creates a new error handler. More... | |
| virtual void | setOutputStream (std::ostream *) |
| specifies on which output stream errors are written (errors not written on a stream if argument is null). | |
| virtual void | setOutputBuffer (UStr *) |
| specifies a string buffer on which errors are written (errors not written on a buffer if argument is null). | |
| UStr & | label () |
| returns the label property of this UErrorHandler. | |
| virtual void | warning (const char *funcname, const char *format,...) const |
| raises a warning; shortcut for raiseError(UError::WARNING, null, ...). | |
| virtual void | error (const char *funcname, const char *format,...) const |
| raises an error; shortcut for raiseError(UError::ERROR, null, ...). | |
| virtual void | error (int errnum, const UObject *, const char *funcname, const char *format,...) const |
| raises an error; shortcut for raiseError(UError::ERROR, ...). | |
| virtual void | parserError (int errnum, const UChar *text_buffer, const char *msg_start, const UStr &name, const char *msg_end, const UChar *line) const |
| used by XML and Style parsers to raise a formatted error. | |
| virtual void | raiseError (int errnum, const UObject *, const char *funcname, const char *format, va_list) const |
| raises an error: prints out a message and/or generate an exception. More... | |
| virtual void | raiseError (int errnum, UStr *msg) const |
| virtual const char * | getErrorName (int errnum) const |
| virtual void | formatMessage (UError &, const char *format, va_list) const |
| virtual void | printOnStream (const UError &) const |
| virtual void | printOnBuffer (const UError &) const |
Public Member Functions inherited from ubit::UObject | |
| UObject (const UObject &) | |
| UObject & | operator= (const UObject &) |
| virtual const UClass & | getClass () const |
| instance method that returns the metaclass of this object. More... | |
| const UStr & | getClassName () const |
| returns getClass().getName(). | |
| bool | isDeletable () const |
| checks if this object can be destroyed by 'delete'. More... | |
| bool | isConst () const |
| checks whether the content of this object can be modified ( More... | |
| UObject & | setConst () |
| specifies that the content of this object cannot be modified. More... | |
| bool | isAutoUpdate () const |
| return current update policy: More... | |
| UObject & | setAutoUpdate (bool state=true) |
| changes the update policy of this object when its is modified. More... | |
| bool | isIgnoringChangeCallbacks () const |
| return true if change callbacks are fired. | |
| UObject & | ignoreChangeCallbacks (bool state) |
| change callbacks are not fired if argument is true. | |
| virtual UNode * | toNode () |
| dynamic cast: returns this object if it derives from UNode and null otherwise. | |
| virtual const UNode * | toNode () const |
| dynamic cast: returns this object if it derives from UNode and null otherwise. | |
| virtual UAttr * | toAttr () |
| dynamic cast: returns this object if it derives from UAttr and null otherwise. | |
| virtual const UAttr * | toAttr () const |
| dynamic cast: returns this object if it derives from UAttr and null otherwise. | |
| virtual UElem * | toElem () |
| dynamic cast: returns this object if it derives from UElem and null otherwise. | |
| virtual const UElem * | toElem () const |
| dynamic cast: returns this object if it derives from UElem and null otherwise. | |
| virtual UData * | toData () |
| dynamic cast: returns this object if it derives from UData and null otherwise. | |
| virtual const UData * | toData () const |
| dynamic cast: returns this object if it derives from UData and null otherwise. | |
| virtual UStr * | toStr () |
| dynamic cast: returns this object if it derives from UStr and null otherwise. | |
| virtual const UStr * | toStr () const |
| dynamic cast: returns this object if it derives from UStr and null otherwise. | |
| virtual UCall * | toCall () |
| dynamic cast: returns this object if it derives from UCall and null otherwise. | |
| virtual const UCall * | toCall () const |
| dynamic cast: returns this object if it derives from UCall and null otherwise. | |
| virtual UBox * | toBox () |
| dynamic cast: returns this object if it derives from UBox and null otherwise. | |
| virtual const UBox * | toBox () const |
| dynamic cast: returns this object if it derives from UBox and null otherwise. | |
| virtual UWin * | toWin () |
| dynamic cast: returns this object if it derives from UWin and null otherwise. | |
| virtual const UWin * | toWin () const |
| dynamic cast: returns this object if it derives from UWin and null otherwise. | |
| virtual UMenu * | toMenu () |
| dynamic cast: returns this object if it derives from UMenu and null otherwise. | |
| virtual const UMenu * | toMenu () const |
| dynamic cast: returns this object if it derives from UMenu and null otherwise. | |
| State | getState () const |
| returns the current object state. | |
| void | setState (State s) |
| changes the object state. | |
| PtrCount | getPtrCount () const |
| [impl] returns the number of uptr<> smart pointers that are pointing to this object. | |
| bool | checkConst () const |
| [impl] produces an error if this object is logically constant ( More... | |
| bool | isDestructed () const |
| [impl] this object has been destructed (but memory has not been freed yet). | |
| bool | isDestructing () const |
| [impl] this object is being destructed (one of its destructors has been called). | |
| virtual bool | hasSceneGraphParent () const |
| void * | operator new (size_t) |
| < [impl] returns true if there is at least one scene graph parent (redefined by UNode). More... | |
| void | operator delete (void *) |
| delete operator is forbidden on instances that derive from UObject. | |
| void | addPtr () const |
| [Impl] a uptr is added to this object. | |
| void | removePtr () const |
| [Impl] a uptr is removed from this object. | |
Protected Attributes | |
| uptr< UStr > | plabel |
| uptr< UStr > | pbuffer |
| std::ostream * | fout |
Protected Attributes inherited from ubit::UObject | |
| PtrCount | ptr_count |
| Modes | omodes |
| State | ostate |
Additional Inherited Members | |
Public Types inherited from ubit::UObject | |
| typedef unsigned char | State |
| typedef short | PtrCount |
Static Public Member Functions inherited from ubit::UObject | |
| static const char * | getVersion () |
| returns the version of the Ubit package. | |
| static const UClass & | Class () |
| class method that returns the metaclass of this class. More... | |
| static UStyle * | createStyle () |
Static Public Attributes inherited from ubit::UObject | |
| static UConst | UCONST |
| UCONST can be given as an argument to some constructors to make the object constant. More... | |
Error management.
| UErrorHandler::UErrorHandler | ( | const UStr & | label, |
| std::ostream * | out_stream = &std::cerr |
||
| ) |
creates a new error handler.
|
virtual |
raises an error: prints out a message and/or generate an exception.
this method:
1.8.12