HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_ErrorManager Class Reference

A global error manager scope. More...

#include <UT_ErrorManager.h>

+ Inheritance diagram for UT_ErrorManager:

Classes

struct  DelayTag
 

Public Member Functions

 UT_ErrorManager ()
 
 ~UT_ErrorManager ()
 
UT_ErrorSeverity addMessage (const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity addPrompt (const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity addWarning (const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity addError (const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity addFatal (const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity sopAddMessage (int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity sopAddPrompt (int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity sopAddWarning (int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity sopAddError (int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity sopAddFatal (int code, const char *msg=0, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity systemError (const char *msg=0)
 
UT_ErrorSeverity systemWarning (const char *msg=0)
 
UT_ErrorSeverity commonWarning (UT_CommonErrorCode what, const char *msg=0)
 
UT_ErrorSeverity commonError (UT_CommonErrorCode what, const char *msg=0)
 
UT_ErrorSeverity commonMessage (UT_CommonErrorCode what, const char *msg=0)
 
UT_ErrorSeverity addDeadlockError ()
 
UT_ErrorSeverity addGeneric (const char *type, int code, const char *msg, UT_ErrorSeverity sev, const UT_SourceLocation *loc=0)
 
UT_ErrorSeverity addGeneric (UT_Error *error)
 
void clearAndDestroyErrors ()
 
bool isEmpty () const
 
int getNumErrors () const
 
const UT_ErrorgetError (int index) const
 
int stealErrors (UT_ErrorManager &victim, int rangestart=0, int rangeend=-1, UT_ErrorSeverity severity=UT_ERROR_NONE, bool borrow_only=false)
 
int removeError (int index)
 
int findError (const char *type, int code) const
 
int getErrorMessages (UT_String &messages, UT_ErrorSeverity severity=UT_ERROR_NONE, bool use_headers=true)
 
UT_ErrorSeverity getSeverity ()
 
void clampSeverity (UT_ErrorSeverity severity)
 
UT_ErrorSeverity getErrorState ()
 
void pruneDuplicates ()
 
bool isDisabled () const
 
void setDisabled (bool f)
 
bool isLogging () const
 
void setErrorLogging (bool f)
 
UT_ErrorSeverity updateSeverity (UT_ErrorSeverity sev)
 
void recomputeSeverity ()
 
bool hasDeadlockError () const
 
void setUniversalLoggingContextFunction (std::function< UT_StringHolder()> context_fn)
 
int64 getMemoryUsage (bool inclusive) const
 
exint getVersion () const
 
UT_ErrorList::const_iterator begin () const
 
UT_ErrorList::const_iterator end () const
 
 Scope (UT_ErrorManager &errors)
 
 Scope (DelayTag)
 Construct scope which has not begun yet. Call begin() to start. More...
 
 ~Scope ()
 Ends error scope if needed. More...
 
UT_ErrorManagergetErrorManager ()
 
int getThread () const
 
UT_ErrorSeverity getSeverity ()
 
void setDisabled (bool f)
 
int getErrorMessages (UT_String &messages, UT_ErrorSeverity severity=UT_ERROR_NONE, bool use_headers=true)
 Get error messages. More...
 
void end ()
 Manually end the scope. Subsequent calls will do nothing. More...
 
 Scope ()
 
 Scope (int thread)
 
void begin ()
 
void begin (int thread)
 

Static Public Member Functions

static int getErrorManagerTimestamp ()
 

Static Public Attributes

static DelayTag Delay
 

Protected Member Functions

void setReadFlag (bool state)
 
bool getReadFlag () const
 
void setNeedScan (bool needscan)
 
bool getNeedScan () const
 
void setDeadlockError (bool onoff)
 
void incrementVersion ()
 

Detailed Description

A global error manager scope.

Definition at line 27 of file UT_ErrorManager.h.

Constructor & Destructor Documentation

UT_ErrorManager::UT_ErrorManager ( )
UT_ErrorManager::~UT_ErrorManager ( )
UT_ErrorManager::~Scope ( )
inline

Ends error scope if needed.

Definition at line 256 of file UT_ErrorManager.h.

Member Function Documentation

UT_ErrorSeverity UT_ErrorManager::addDeadlockError ( )
UT_ErrorSeverity UT_ErrorManager::addError ( const char *  type,
int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
UT_ErrorSeverity UT_ErrorManager::addFatal ( const char *  type,
int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
UT_ErrorSeverity UT_ErrorManager::addGeneric ( const char *  type,
int  code,
const char *  msg,
UT_ErrorSeverity  sev,
const UT_SourceLocation loc = 0 
)
UT_ErrorSeverity UT_ErrorManager::addGeneric ( UT_Error error)
UT_ErrorSeverity UT_ErrorManager::addMessage ( const char *  type,
int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
UT_ErrorSeverity UT_ErrorManager::addPrompt ( const char *  type,
int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
UT_ErrorSeverity UT_ErrorManager::addWarning ( const char *  type,
int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
UT_ErrorList::const_iterator UT_ErrorManager::begin ( void  ) const
inline

Definition at line 191 of file UT_ErrorManager.h.

void UT_ErrorManager::begin ( )

Manually begin the scope. Subsequent calls will do nothing until end() is called.

void UT_ErrorManager::begin ( int  thread)

Manually begin the scope. Subsequent calls will do nothing until end() is called.

void UT_ErrorManager::clampSeverity ( UT_ErrorSeverity  severity)
void UT_ErrorManager::clearAndDestroyErrors ( )
UT_ErrorSeverity UT_ErrorManager::commonError ( UT_CommonErrorCode  what,
const char *  msg = 0 
)
UT_ErrorSeverity UT_ErrorManager::commonMessage ( UT_CommonErrorCode  what,
const char *  msg = 0 
)
UT_ErrorSeverity UT_ErrorManager::commonWarning ( UT_CommonErrorCode  what,
const char *  msg = 0 
)
UT_ErrorList::const_iterator UT_ErrorManager::end ( void  ) const
inline

Definition at line 192 of file UT_ErrorManager.h.

void UT_ErrorManager::end ( )

Manually end the scope. Subsequent calls will do nothing.

int UT_ErrorManager::findError ( const char *  type,
int  code 
) const
const UT_Error& UT_ErrorManager::getError ( int  index) const
inline

Definition at line 87 of file UT_ErrorManager.h.

UT_ErrorManager& UT_ErrorManager::getErrorManager ( )
inline

Definition at line 258 of file UT_ErrorManager.h.

static int UT_ErrorManager::getErrorManagerTimestamp ( )
static

Returns a timestamp that is incremented every time an error of ABORT or higher is logged.

int UT_ErrorManager::getErrorMessages ( UT_String messages,
UT_ErrorSeverity  severity = UT_ERROR_NONE,
bool  use_headers = true 
)
int UT_ErrorManager::getErrorMessages ( UT_String messages,
UT_ErrorSeverity  severity = UT_ERROR_NONE,
bool  use_headers = true 
)
inline

Get error messages.

Definition at line 269 of file UT_ErrorManager.h.

UT_ErrorSeverity UT_ErrorManager::getErrorState ( )
inline

Definition at line 118 of file UT_ErrorManager.h.

int64 UT_ErrorManager::getMemoryUsage ( bool  inclusive) const
inline

Definition at line 172 of file UT_ErrorManager.h.

bool UT_ErrorManager::getNeedScan ( ) const
inlineprotected

Definition at line 201 of file UT_ErrorManager.h.

int UT_ErrorManager::getNumErrors ( ) const
inline

Definition at line 86 of file UT_ErrorManager.h.

bool UT_ErrorManager::getReadFlag ( ) const
inlineprotected

Definition at line 195 of file UT_ErrorManager.h.

UT_ErrorSeverity UT_ErrorManager::getSeverity ( )
inline

Definition at line 105 of file UT_ErrorManager.h.

UT_ErrorSeverity UT_ErrorManager::getSeverity ( )
inline

Definition at line 261 of file UT_ErrorManager.h.

int UT_ErrorManager::getThread ( ) const
inline

Definition at line 259 of file UT_ErrorManager.h.

exint UT_ErrorManager::getVersion ( ) const
inline

Returns an integer that is incremented every time an error is logged.

Definition at line 187 of file UT_ErrorManager.h.

bool UT_ErrorManager::hasDeadlockError ( ) const
inline

Definition at line 163 of file UT_ErrorManager.h.

void UT_ErrorManager::incrementVersion ( )
inlineprotected

Definition at line 214 of file UT_ErrorManager.h.

bool UT_ErrorManager::isDisabled ( ) const
inline

Definition at line 122 of file UT_ErrorManager.h.

bool UT_ErrorManager::isEmpty ( ) const
inline

Definition at line 85 of file UT_ErrorManager.h.

bool UT_ErrorManager::isLogging ( ) const
inline

Definition at line 133 of file UT_ErrorManager.h.

void UT_ErrorManager::pruneDuplicates ( )
void UT_ErrorManager::recomputeSeverity ( )
inline

Definition at line 157 of file UT_ErrorManager.h.

int UT_ErrorManager::removeError ( int  index)
UT_ErrorManager::Scope ( )

Push empty error manager

UT_ErrorManager::Scope ( int  thread)
explicit

Push empty error manager

UT_ErrorManager::Scope ( UT_ErrorManager errors)

Push given error manager, must live beyond current scope. This renders all accessors on this class unusable.

UT_ErrorManager::Scope ( DelayTag  )
inline

Construct scope which has not begun yet. Call begin() to start.

Definition at line 252 of file UT_ErrorManager.h.

void UT_ErrorManager::setDeadlockError ( bool  onoff)
inlineprotected

Definition at line 206 of file UT_ErrorManager.h.

void UT_ErrorManager::setDisabled ( bool  f)
inline

Definition at line 126 of file UT_ErrorManager.h.

void UT_ErrorManager::setDisabled ( bool  f)
inline

Disable error accumulation for this scope, note however that the status will be maintained.

Definition at line 265 of file UT_ErrorManager.h.

void UT_ErrorManager::setErrorLogging ( bool  f)
inline

Definition at line 139 of file UT_ErrorManager.h.

void UT_ErrorManager::setNeedScan ( bool  needscan)
protected
void UT_ErrorManager::setReadFlag ( bool  state)
protected
void UT_ErrorManager::setUniversalLoggingContextFunction ( std::function< UT_StringHolder()>  context_fn)
inline

Definition at line 168 of file UT_ErrorManager.h.

UT_ErrorSeverity UT_ErrorManager::sopAddError ( int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
inline

Definition at line 61 of file UT_ErrorManager.h.

UT_ErrorSeverity UT_ErrorManager::sopAddFatal ( int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
inline

Definition at line 64 of file UT_ErrorManager.h.

UT_ErrorSeverity UT_ErrorManager::sopAddMessage ( int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
inline

Definition at line 52 of file UT_ErrorManager.h.

UT_ErrorSeverity UT_ErrorManager::sopAddPrompt ( int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
inline

Definition at line 55 of file UT_ErrorManager.h.

UT_ErrorSeverity UT_ErrorManager::sopAddWarning ( int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
)
inline

Definition at line 58 of file UT_ErrorManager.h.

int UT_ErrorManager::stealErrors ( UT_ErrorManager victim,
int  rangestart = 0,
int  rangeend = -1,
UT_ErrorSeverity  severity = UT_ERROR_NONE,
bool  borrow_only = false 
)
UT_ErrorSeverity UT_ErrorManager::systemError ( const char *  msg = 0)
UT_ErrorSeverity UT_ErrorManager::systemWarning ( const char *  msg = 0)
UT_ErrorSeverity UT_ErrorManager::updateSeverity ( UT_ErrorSeverity  sev)
inline

Definition at line 147 of file UT_ErrorManager.h.

Member Data Documentation

DelayTag UT_ErrorManager::Delay
static

Definition at line 239 of file UT_ErrorManager.h.


The documentation for this class was generated from the following file: