91 :
public std::exception,
93 #define ORIGINAL_ERROR_MSG "An error thrown"
95 mutable std::string msg_;
102 return ORIGINAL_ERROR_MSG;
124 std::stringstream
ss;
126 if (!this->msg_.empty()){
127 ss << this->msg_ <<
".";
140 return this->msg_.c_str();
164 template<
typename ERR, const
bool TRIGGERING_CONDITION>
165 requires ExtendsOf<error, ERR>
194 #define ORIGINAL_OUT_OF_BOUND_ERROR_MSG "Wrong value given"
200 return "outOfBoundError";
204 return ORIGINAL_OUT_OF_BOUND_ERROR_MSG;
221 #define ORIGINAL_VALUE_ERROR_ERROR_MSG "Wrong value given"
231 return ORIGINAL_VALUE_ERROR_ERROR_MSG;
247 #define ORIGINAL_NULL_POINTER_ERROR_MSG "Attempting to access null pointer"
253 return "nullPointerError";
257 return ORIGINAL_NULL_POINTER_ERROR_MSG;
273 #define ORIGINAL_UNSUPPORTED_METHOD_ERROR_MSG "Unsupported Method for the call"
279 return "unSupportedMethodError";
283 return ORIGINAL_UNSUPPORTED_METHOD_ERROR_MSG;
300 #define ORIGINAL_NO_ELEMENT_ERROR_MSG "No such element"
306 return "noElementError";
310 return ORIGINAL_NO_ELEMENT_ERROR_MSG;
326 #define ORIGINAL_CALLBACK_SIGNATURE_ERROR_MSG "Callback signature mismatch"
332 return "callbackSignatureError";
336 return ORIGINAL_CALLBACK_SIGNATURE_ERROR_MSG;
352 #define ORIGINAL_CALLBACK_RETURN_TYPE_ERROR_MSG "Return type of callback mismatch"
358 return "callbackReturnTypeError";
362 return ORIGINAL_CALLBACK_RETURN_TYPE_ERROR_MSG;
387 #define ORIGINAL_ALLOCATE_ERROR_MSG "Can not allocate memory"
393 return "allocateError";
397 return ORIGINAL_ALLOCATE_ERROR_MSG;
415 #define ORIGINAL_SYS_ERROR_MSG "A system error triggered"
425 return ORIGINAL_SYS_ERROR_MSG;
433template<
typename Callback,
typename Ret_TYPE,
typename... Args_TYPE>
446template <const
bool TRIGGERING_CONDITION>
455template <const
bool TRIGGERING_CONDITION>
464template <const
bool TRIGGERING_CONDITION>
473template <const
bool TRIGGERING_CONDITION>
482template <const
bool TRIGGERING_CONDITION>
491template <const
bool TRIGGERING_CONDITION>
500template <const
bool TRIGGERING_CONDITION>
509template <const
bool TRIGGERING_CONDITION>
518template <const
bool TRIGGERING_CONDITION>
527template <const
bool TRIGGERING_CONDITION>
Exception for memory allocation failures.
Definition error.h:385
std::string className() const override
Gets the class name for type identification.
Definition error.h:392
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:396
Static utility for validating callback signatures.
Definition error.h:55
static void check()
Validates a callback's signature and return type.
Definition error.h:434
Exception for callback return type mismatch.
Definition error.h:350
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:361
std::string className() const override
Gets the class name for type identification.
Definition error.h:357
Exception for callback argument mismatch.
Definition error.h:324
std::string className() const override
Gets the class name for type identification.
Definition error.h:331
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:335
Base class for all exceptions in the Original project.
Definition error.h:92
error(std::string msg)
Constructs an exception with an optional message.
Definition error.h:109
const char * what() const noexcept override
Returns the full error message.
Definition error.h:138
std::string className() const override
Returns the class name as string.
Definition error.h:115
virtual std::string defaultMsg() const
Provides default message when no custom message is supplied.
Definition error.h:101
std::string message() const noexcept
Generates formatted error message.
Definition error.h:123
Exception for missing element requests.
Definition error.h:298
std::string className() const override
Returns the class name as string.
Definition error.h:305
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:309
Exception for null pointer dereference attempts.
Definition error.h:245
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:256
std::string className() const override
Returns the class name as string.
Definition error.h:252
Exception for container index out-of-range errors.
Definition error.h:192
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:203
std::string className() const override
Returns the class name as string.
Definition error.h:199
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
Base class providing polymorphic string conversion capabilities.
Definition printable.h:39
Compile-time error triggering utility.
Definition error.h:167
static void asserts()
Triggers static assertion if the condition is true.
Definition error.h:174
Exception for generic system failure.
Definition error.h:413
std::string className() const override
Returns the class name as string.
Definition error.h:420
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:424
Exception for unimplemented method calls.
Definition error.h:271
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:282
std::string className() const override
Returns the class name as string.
Definition error.h:278
Exception for invalid parameter values.
Definition error.h:219
std::string className() const override
Returns the class name as string.
Definition error.h:226
std::string defaultMsg() const override
Provides default message when no custom message is supplied.
Definition error.h:230
Main namespace for the project Original.
Definition algorithms.h:21
Standard namespace extensions for original::alternative.
Definition allocator.h:351
Interface for polymorphic string formatting and output.
Core type system foundations and concept definitions.