19 typedef std::shared_ptr<Exception>
Ptr;
25 template<
typename... Args>
26 Exception(
const char* message,
const Args& ... args);
85 virtual String Format(
int indentLevel,
bool withInnerException)
const;
106 template<
typename... Args>
108 : message(
String::Format(messageArg, args...))
113 : message(messageArg)
118 : message(
std::move(messageArg))
123 : message(messageArg), innerExceptionPtr(innerException.Clone())
128 : message(
std::move(messageArg)), innerExceptionPtr(innerException.Clone())
133 : message(
std::move(messageArg)), innerExceptionPtr(innerException)
139 return this->message;
144 return (
bool)this->innerExceptionPtr;
149 return this->innerExceptionPtr;
This is the base class of all Arp exception classes.
Definition: Exception.hpp:16
Exception::Ptr GetInnerException(void) const
Gets the inner exception of this exception.
Definition: Exception.hpp:147
uint32 GetTypeCode(void) const
Gets the type code of this exception.
Definition: Exception.hpp:152
const String & GetMessage(void) const
Gets the error message of this exception.
Definition: Exception.hpp:137
std::shared_ptr< Exception > Ptr
The smart pointer tpye of this class.
Definition: Exception.hpp:19
virtual Exception::Ptr Clone(void) const
Clones this instance.
Exception(Exception &&arg)=default
Constructs an instance of class Exception.
String ToString(void) const
Gets a reasonable string representation of this exception.
static const int indentChar
The indentation character (blank)
Definition: Exception.hpp:100
virtual uint32 GetTypeCodeInternal(void) const
Get the type code of this exception. Must be overridden by derived classes.
bool HasInnerException(void) const
Determines if this exception has an inner exception.
Definition: Exception.hpp:142
static const int indentSize
The indentation size (count of blanks)
Definition: Exception.hpp:99
virtual String Format(int indentLevel, bool withInnerException) const
Formats this exception using the given indent level.
Exception(const Exception &arg)=default
Constructs an instance of class Exception.
Exception(const char *message, const Args &... args)
Constructs an instance of class Exception.
Definition: Exception.hpp:107
static const int innerIndentChar
The indentation character to indent inner exceptions.
Definition: Exception.hpp:101
virtual ~Exception(void)=default
Destructs this instance virually.
std::ostream & operator<<(std::ostream &os, const BasicString< CharType, Alloc > &right)
Streams the right string to the outstream os .
Definition: BasicString.hxx:1708
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:35
Root namespace for the PLCnext API
Namespace of the C++ standard library