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__)
35 #include <boost/static_assert.hpp>
59 #pragma warning (push)
60 #pragma warning (disable:4251)
80 const std::wstring & fileName,
97 const std::wstring GetExceptionInfo()
const;
118 virtual const std::wstring
GetName()
const = 0;
150 virtual const char * what()
const throw();
165 Dob::Typesystem::
Int64 m_LineNumber;
166 std::wstring m_FileName;
167 std::wstring m_Message;
174 mutable std::
string m_ConvertedMessage;
178 #pragma warning (pop)
207 const std::wstring & fileName,
211 static const TypeId ExceptionTypeId = 5177142987005172374LL;
240 const std::wstring & fileName,
244 static const TypeId ExceptionTypeId = 8409897425067168944LL;
271 const std::wstring & fileName,
276 const std::wstring
GetName()
const {
return L
"Safir.Dob.Typesystem.IllegalValueException";}
279 static const TypeId ExceptionTypeId = -3653935143986901894LL;
306 const std::wstring & fileName,
311 const std::wstring
GetName()
const {
return L
"Safir.Dob.Typesystem.IncompatibleTypesException";}
314 static const TypeId ExceptionTypeId = -5150658527844777416LL;
341 const std::wstring & fileName,
346 const std::wstring
GetName()
const {
return L
"Safir.Dob.Typesystem.ConfigurationErrorException";}
349 static const TypeId ExceptionTypeId = 2909620812590558895LL;
377 const std::wstring & fileName,
382 const std::wstring
GetName()
const {
return L
"Safir.Dob.Typesystem.SoftwareViolationException";}
385 static const TypeId ExceptionTypeId = -2318636033853590373LL;
411 const std::wstring & fileName,
416 const std::wstring
GetName()
const {
return L
"Safir.Dob.Typesystem.NullException";}
419 static const TypeId ExceptionTypeId = -6392953138294149211LL;
447 const std::wstring & fileName,
452 const std::wstring
GetName()
const {
return L
"Safir.Dob.Typesystem.ReadOnlyException";}
455 static const TypeId ExceptionTypeId = -4804695341042352897LL;
IllegalValueException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition: Exceptions.h:270
virtual TypeId GetTypeId() const
Get the type id of this exception.
Definition: Exceptions.h:388
const std::wstring GetName() const
Get the exception name.
Definition: Exceptions.h:382
Used when there is an error that implies that there is something wrong in the configuration.
Definition: Exceptions.h:324
ConfigurationErrorException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition: Exceptions.h:340
const std::wstring GetName() const
Get the exception name.
Definition: Exceptions.h:452
DOTS_CPP_API Dob::Typesystem::TypeId GetTypeId(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member)
Get type id of object or enumeration member.
const std::wstring & GetMessage() const
Get the message about why the exception occurred.
Definition: Exceptions.h:111
This is the base class of all (non-Fundamental) Exceptions.
Definition: Exceptions.h:223
SoftwareViolationException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition: Exceptions.h:376
Meant to be used when something goes very wrong.
Definition: Exceptions.h:360
This is the base class of all Fundamental Exceptions.
Definition: Exceptions.h:190
virtual TypeId GetTypeId() const
Get the type id of this exception.
Definition: Exceptions.h:458
DotsC_Int64 Int64
64 bit integer type.
Definition: Defs.h:70
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:219
NullException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition: Exceptions.h:410
virtual TypeId GetTypeId() const
Get the type id of this exception.
Definition: Exceptions.h:214
ReadOnlyException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition: Exceptions.h:446
const std::wstring GetName() const
Get the exception name.
Definition: Exceptions.h:311
const Dob::Typesystem::Int64 GetLineNumber() const
Get the line number that the exception occurred on.
Definition: Exceptions.h:132
const std::wstring GetName() const
Get the exception name.
Definition: Exceptions.h:346
virtual TypeId GetTypeId() const
Get the type id of this exception.
Definition: Exceptions.h:352
A parameter in the call was invalid.
Definition: Exceptions.h:254
virtual TypeId GetTypeId() const
Get the type id of this exception.
Definition: Exceptions.h:317
Thrown when an application attempts to get the value of a member that is null.
Definition: Exceptions.h:394
const std::wstring & GetFileName() const
Get the name of the file where the exception occurred.
Definition: Exceptions.h:125
const std::wstring GetName() const
Get the exception name.
Definition: Exceptions.h:416
IncompatibleTypesException(const std::wstring &message, const std::wstring &fileName, const Dob::Typesystem::Int64 lineNumber)
Constructor with exception information.
Definition: Exceptions.h:305
const std::wstring GetName() const
Get the exception name.
Definition: Exceptions.h:276
Common functionality for the exception hierarchy of the DOB typesystem.
Definition: Exceptions.h:63
virtual TypeId GetTypeId() const
Get the type id of this exception.
Definition: Exceptions.h:282
#define DOTS_CPP_API
Definition: Defs.h:33
DOTS_CPP_API std::wstring GetName(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member)
Get the name of the specified member as it was defined in the xml description.
virtual TypeId GetTypeId() const
Get the type id of this exception.
Definition: Exceptions.h:422
virtual TypeId GetTypeId() const
Get the type id of this exception.
Definition: Exceptions.h:247
Used when someone tries to set a property that is mapped to something that cannot be changed...
Definition: Exceptions.h:430
This exception is thrown if a class cannot be cast to the expected type.
Definition: Exceptions.h:289