DCL 3.7.4
Loading...
Searching...
No Matches
AssertError Class Reference

#include <Exception.h>

Inheritance diagram for AssertError:
Exception Object

Public Member Functions

 AssertError (const char_t *_filename, unsigned int _line, const char_t *_expr, const char_t *_message)
virtual String toString () const
Public Member Functions inherited from Exception
 Exception (Exception *_cause=NULL)
const Exceptioncause () const
String toStringAll () const
virtual void destroy ()
Public Member Functions inherited from Object
String className () const
bool isInstanceOf (const std::type_info &typeinfo) const
virtual const std::type_info & typeInfo () const

Static Public Member Functions

static String format (const char_t *_filename, unsigned int _line, const char_t *_expr, const char_t *_message)

Additional Inherited Members

Protected Member Functions inherited from Exception
virtual ~Exception ()
Protected Member Functions inherited from Object
virtual ~Object ()
 Object ()
Protected Attributes inherited from Exception
Exception__cause

Detailed Description

Definition at line 180 of file Exception.h.

Constructor & Destructor Documentation

◆ AssertError()

AssertError::AssertError ( const char_t * _filename,
unsigned int _line,
const char_t * _expr,
const char_t * _message )

Member Function Documentation

◆ format()

String AssertError::format ( const char_t * _filename,
unsigned int _line,
const char_t * _expr,
const char_t * _message )
static

Definition at line 361 of file Exception.cpp.

367{
368 StringBuilder sb = L"Assertion Failed ! '";
369 sb += _expr;
370 sb += L"'";
371 if (_message) {
372 sb += L" ";
373 sb += _message;
374 }
375 sb += L", File ";
376 sb += _filename;
377 sb += L":";
378 sb += Int32::toString((int32_t)_line, 10);
379
380 return sb;
381}
String toString(unsigned _base=10) const
Definition Numeric.inl:93

◆ toString()

String AssertError::toString ( ) const
virtual

Reimplemented from Exception.

Definition at line 354 of file Exception.cpp.

355{
356 return format(__filename, __line, __expr,
357 __message.isEmpty() ? NULL : __message.data()
358 );
359}
#define NULL
Definition Config.h:312
static String format(const char_t *_filename, unsigned int _line, const char_t *_expr, const char_t *_message)

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