Safir SDK Core
Loading...
Searching...
No Matches
Safir::Dob::Typesystem::FundamentalException Class Reference

This is the base class of all Fundamental Exceptions. More...

#include <Safir/Dob/Typesystem/Exceptions.h>

Inheritance diagram for Safir::Dob::Typesystem::FundamentalException:
[legend]
Collaboration diagram for Safir::Dob::Typesystem::FundamentalException:
[legend]

Public Member Functions

 FundamentalException (const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
 Constructor with exception information.
 
TypeId GetTypeId () const override
 Get the type id of this exception.
 
- Public Member Functions inherited from Safir::Dob::Typesystem::Internal::CommonExceptionBase
 CommonExceptionBase (const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
 Constructor with exception information.
 
virtual ~CommonExceptionBase () throw ()
 Destroy the exception.
 
const std::wstring GetExceptionInfo () const
 Get a formatted string containing all the information in the exception.
 
const char * what () const override throw ()
 Get the GetExceptionInfo as a UTF8 encoded string.
 
const std::wstring & GetMessage () const
 Get the message about why the exception occurred.
 
virtual const std::wstring GetName () const =0
 Get the exception name.
 
const std::wstring & GetFileName () const
 Get the name of the file where the exception occurred.
 
Dob::Typesystem::Int64 GetLineNumber () const
 Get the line number that the exception occurred on.
 

Static Public Attributes

static const TypeId ExceptionTypeId = 5177142987005172374LL
 The TypeId of this exception.
 

Detailed Description

This is the base class of all Fundamental Exceptions.

All exceptions that signify "static errors" should inherit from this class. Fundamental Exceptions are exceptions that are only expected to be caught by the main loop in applications. They usually mean that something has gone very wrong.

Constructor & Destructor Documentation

◆ FundamentalException()

Safir::Dob::Typesystem::FundamentalException::FundamentalException ( const std::wstring & message,
const std::wstring & fileName,
const Dob::Typesystem::Int64 lineNumber )

Constructor with exception information.

Creates an exception that contains information about why and where the exception occurred.

Parameters
message[in] - A message describing why the exception occurred.
fileName[in] - The name of the file where the exception occurred. Always use WFILE as the argument for this parameter.
lineNumber[in] - The line number that the exception occurred on. Always use LINE as the argument for this parameter.

Member Function Documentation

◆ GetTypeId()

TypeId Safir::Dob::Typesystem::FundamentalException::GetTypeId ( ) const
overridevirtual

Get the type id of this exception.

Gets the type id of the exception. Method is virtual to ensure that the right value gets returned for pointers or references.

Note: This method is overridden by all auto-generated classes.

Returns
The TypeId of the exception.

Implements Safir::Dob::Typesystem::Internal::CommonExceptionBase.

Reimplemented in Safir::Dob::Typesystem::IllegalValueException, Safir::Dob::Typesystem::IncompatibleTypesException, Safir::Dob::Typesystem::SoftwareViolationException, Safir::Dob::Typesystem::NullException, Safir::Dob::Typesystem::ReadOnlyException, Safir::Dob::GhostExistsException, and Safir::Dob::NotOpenException.

Member Data Documentation

◆ ExceptionTypeId

const TypeId Safir::Dob::Typesystem::FundamentalException::ExceptionTypeId = 5177142987005172374LL
static

The TypeId of this exception.