25#ifndef _dots_exception_h
26#define _dots_exception_h
29#define WIDEN2(x) L ## x
30#define WIDEN(x) WIDEN2(x)
31#define __WFILE__ WIDEN(__FILE__)
67#pragma warning (disable:4251)
68#pragma warning (disable:4275)
88 const std::wstring & fileName,
105 const std::wstring GetExceptionInfo() const;
119 const std::wstring & GetMessage()
const {
return m_Message;}
126 virtual const std::wstring
GetName()
const = 0;
158 const char *
what()
const throw() override;
173 Dob::Typesystem::
Int64 m_LineNumber;
174 std::wstring m_FileName;
175 std::wstring m_Message;
182 mutable std::
string m_ConvertedMessage;
215 const std::wstring & fileName,
219 static const TypeId ExceptionTypeId = 5177142987005172374LL;
248 const std::wstring & fileName,
252 static const TypeId ExceptionTypeId = 8409897425067168944LL;
279 const std::wstring & fileName,
283 const std::wstring
GetName()
const override {
return L
"Safir.Dob.Typesystem.IllegalValueException";}
286 static const TypeId ExceptionTypeId = -3653935143986901894LL;
312 const std::wstring & fileName,
316 const std::wstring
GetName()
const override {
return L
"Safir.Dob.Typesystem.IncompatibleTypesException";}
319 static const TypeId ExceptionTypeId = -5150658527844777416LL;
345 const std::wstring & fileName,
349 const std::wstring
GetName()
const override {
return L
"Safir.Dob.Typesystem.ConfigurationErrorException";}
352 static const TypeId ExceptionTypeId = 2909620812590558895LL;
379 const std::wstring & fileName,
383 const std::wstring
GetName()
const override {
return L
"Safir.Dob.Typesystem.SoftwareViolationException";}
386 static const TypeId ExceptionTypeId = -2318636033853590373LL;
411 const std::wstring & fileName,
415 const std::wstring
GetName()
const override {
return L
"Safir.Dob.Typesystem.NullException";}
418 static const TypeId ExceptionTypeId = -6392953138294149211LL;
445 const std::wstring & fileName,
449 const std::wstring
GetName()
const override {
return L
"Safir.Dob.Typesystem.ReadOnlyException";}
452 static const TypeId ExceptionTypeId = -4804695341042352897LL;
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
DotsC_Int64 Int64
64 bit integer type.
Definition Defs.h:69
DotsC_TypeId TypeId
A unique type identifier.
Definition Defs.h:218
Common functionality for the exception hierarchy of the DOB typesystem.
Definition Exceptions.h:73
virtual ~CommonExceptionBase()
Destroy the exception.
const char * what() const override
Get the GetExceptionInfo as a UTF8 encoded string.
const std::wstring & GetFileName() const
Get the name of the file where the exception occurred.
Definition Exceptions.h:133
CommonExceptionBase(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
virtual const std::wstring GetName() const =0
Get the exception name.
Dob::Typesystem::Int64 GetLineNumber() const
Get the line number that the exception occurred on.
Definition Exceptions.h:140
This is the base class of all Fundamental Exceptions.
Definition Exceptions.h:200
TypeId GetTypeId() const override
Get the type id of this exception.
Definition Exceptions.h:222
FundamentalException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
This is the base class of all (non-Fundamental) Exceptions.
Definition Exceptions.h:233
TypeId GetTypeId() const override
Get the type id of this exception.
Definition Exceptions.h:255
Exception(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
A parameter in the call was invalid.
Definition Exceptions.h:264
IllegalValueException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition Exceptions.h:278
const std::wstring GetName() const override
Get the exception name.
Definition Exceptions.h:283
TypeId GetTypeId() const override
Get the type id of this exception.
Definition Exceptions.h:288
This exception is thrown if a class cannot be cast to the expected type.
Definition Exceptions.h:297
const std::wstring GetName() const override
Get the exception name.
Definition Exceptions.h:316
TypeId GetTypeId() const override
Get the type id of this exception.
Definition Exceptions.h:321
IncompatibleTypesException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition Exceptions.h:311
Used when there is an error that implies that there is something wrong in the configuration.
Definition Exceptions.h:330
ConfigurationErrorException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition Exceptions.h:344
TypeId GetTypeId() const override
Get the type id of this exception.
Definition Exceptions.h:354
const std::wstring GetName() const override
Get the exception name.
Definition Exceptions.h:349
Meant to be used when something goes very wrong.
Definition Exceptions.h:364
TypeId GetTypeId() const override
Get the type id of this exception.
Definition Exceptions.h:388
SoftwareViolationException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition Exceptions.h:378
const std::wstring GetName() const override
Get the exception name.
Definition Exceptions.h:383
Thrown when an application attempts to get the value of a member that is null.
Definition Exceptions.h:396
NullException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition Exceptions.h:410
const std::wstring GetName() const override
Get the exception name.
Definition Exceptions.h:415
TypeId GetTypeId() const override
Get the type id of this exception.
Definition Exceptions.h:420
Used when someone tries to set a property that is mapped to something that cannot be changed.
Definition Exceptions.h:430
const std::wstring GetName() const override
Get the exception name.
Definition Exceptions.h:449
ReadOnlyException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition Exceptions.h:444
TypeId GetTypeId() const override
Get the type id of this exception.
Definition Exceptions.h:454
#define DOTS_CPP_API
Definition Defs.h:33