Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jm::Exception Class Reference

This class represents an exception that can be "thrown" in case of unexpected errors. More...

Inheritance diagram for jm::Exception:
jm::Object

Public Member Functions

 Exception (const String &message)
 Constructor.
 
 Exception (const Exception &other)
 Constructor.
 
 ~Exception () noexcept override=default
 Destructor.
 
String errorMessage () const
 Returns the error message.
 
void printStackTrace () const
 Writes the stack trace into the std::cout.
 
String GetStrackTrace () const
 Returns the stack trace of the exception. Useful to find the origin of the exception.
 
- Public Member Functions inherited from jm::Object
 Object () noexcept
 Constructor.
 
virtual ~Object () noexcept
 Destructor.
 
void release () noexcept
 Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
 
Objectretain () noexcept
 Increases the reference counter of this object by 1.
 
Objectautorelease () noexcept
 Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
 
int32 referenceCount () const noexcept
 Returns the value of the reference counter.
 
virtual bool equals (const Object *other) const
 Comparison of objects.
 
virtual String displayName () const
 Returns the display name of the object intended to present to a user.
 
virtual void printDiffInfo (DiffOperation operation, Object *other) const
 Output method for outputting the diff results for the diff algorithm.
 
void setHighBit (bool status) noexcept
 
bool highBit () const noexcept
 

Detailed Description

This class represents an exception that can be "thrown" in case of unexpected errors.

Warning
Do not use in new implementations

Constructor & Destructor Documentation

◆ Exception() [1/2]

jm::Exception::Exception ( const String message)
explicit

Constructor.

Parameters
messageThe error message for the developer or user.

◆ Exception() [2/2]

jm::Exception::Exception ( const Exception other)

Constructor.

◆ ~Exception()

jm::Exception::~Exception ( )
overridedefaultnoexcept

Destructor.

Member Function Documentation

◆ errorMessage()

String jm::Exception::errorMessage ( ) const

Returns the error message.

◆ GetStrackTrace()

String jm::Exception::GetStrackTrace ( ) const

Returns the stack trace of the exception. Useful to find the origin of the exception.

◆ printStackTrace()

void jm::Exception::printStackTrace ( ) const

Writes the stack trace into the std::cout.