63 const std::source_location Location = std::source_location::current()) noexcept;
78 default:
return "Info";
94 default:
return "Blue";
101 #ifdef DYNEXP_HAS_STACKTRACE
102 auto& GetStackTrace()
const {
return Trace; }
112 #ifdef DYNEXP_HAS_STACKTRACE
116 const std::stacktrace Trace;
140 const std::source_location Location = std::source_location::current()) noexcept
153 const std::source_location Location = std::source_location::current()) noexcept
166 const std::source_location Location = std::source_location::current()) noexcept
178 const std::source_location Location = std::source_location::current()) noexcept
190 const std::source_location Location = std::source_location::current()) noexcept
202 const std::source_location Location = std::source_location::current()) noexcept
214 const std::source_location Location = std::source_location::current()) noexcept
227 const std::source_location Location = std::source_location::current()) noexcept
239 const std::source_location Location = std::source_location::current()) noexcept
251 :
Exception("A base pointer did not belong to the expected derived type.",
264 const std::source_location Location = std::source_location::current()) noexcept
289 const std::source_location Location = std::source_location::current()) noexcept
302 :
Exception("This function has not been implemented for the given item type.",
306 const std::source_location Location = std::source_location::current()) noexcept
318 const std::source_location Location = std::source_location::current()) noexcept
319 :
Exception("Error reading from or writing to file \"" + Filename + "\".",
333 "A linked
object wrapper container is empty. Probably, the respective
object link parameter has not been locked calling RunnableInstance::LockObject().",
348 "An
object link does not point to a valid destination. Probably, an
object referenced by an
object link parameter has been removed from the project.",
360 const std::source_location Location = std::source_location::current()) noexcept
371 std::ostream&
operator<<(std::ostream& stream,
const Exception& e);
Thrown when a list is expected to contain entries and when a query results in an empty answer or an e...
EmptyException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
DynExp exceptions are derived from this class. It contains basic information about the cause of the e...
const std::string File
Source code file where the exception occurred.
constexpr static const char * GetErrorLabel(const ErrorType Type)
Converts an error type to a user-readable label for logging.
const size_t Line
Line in source code where the exception occurred.
constexpr const char * GetErrorLabel() const
Exception(std::string Description, const ErrorType Type=ErrorType::Error, const int ErrorCode=-1, const std::source_location Location=std::source_location::current()) noexcept
Constructs an exception. Constructor is noexcept, although std::runtime_error() might throw std::bad_...
const std::string Function
Function in source code where the exception occurred
const ErrorType Type
DynExp error type from Util::ErrorType
constexpr static const char * GetErrorLabelColor(const ErrorType Type)
Converts an error type to an HTML color name for logging.
virtual ~Exception()=default
const int ErrorCode
DynExp error code from DynExpErrorCodes::DynExpErrorCodes
constexpr const char * GetErrorLabelColor() const
Thrown when reading from or writing to a file failed.
FileIOErrorException(std::string Filename, const std::source_location Location=std::source_location::current()) noexcept
Class to forward an Exception instance from one DynExp::Object instance to another DynExp::Object ins...
ForwardedException() noexcept
ForwardedException(const Exception &e) noexcept
ForwardedException(const std::exception &e) noexcept
An invalid argument like a null pointer has been passed to a function.
InvalidArgException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
Thrown when a function call is not allowed to a specific thread in a multi-threading context.
InvalidCallException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
Data to operate on is invalid for a specific purpose. This indicates a corrupted data structure or fu...
InvalidDataException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
Thrown when RunnableInstance cannot lock an object to be used by another object due to an invalid lin...
InvalidObjectLinkException(const std::source_location Location=std::source_location::current()) noexcept
An operation cannot be performed currently since the related object is in an invalid state like an er...
InvalidStateException(std::string Description, const int ErrorCode=DynExpErrorCodes::InvalidState, const std::source_location Location=std::source_location::current()) noexcept
Thrown when RunnableInstance::LockObject() has not been called on an object link parameter to establi...
LinkedObjectNotLockedException(const std::source_location Location=std::source_location::current()) noexcept
Thrown when some operation or feature is temporarily or permanently not available.
NotAvailableException(std::string Description, const ErrorType Type=ErrorType::Warning, const std::source_location Location=std::source_location::current()) noexcept
Thrown when a requested ressource does not exist.
NotFoundException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
Thrown when a requested feature is either under development and thus not implemented yet or when a sp...
NotImplementedException(const std::source_location Location=std::source_location::current()) noexcept
NotImplementedException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
Thrown when an argument passed to a function exceeds the valid range.
OutOfRangeException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
Thrown when a numeric operation would result in an overflow (e.g. due to incompatible data types)
OverflowException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
Denotes that e.g. a remote gRPC service failed.
ServiceFailedException(std::string Description, const ErrorType Type=ErrorType::Error, const std::source_location Location=std::source_location::current()) noexcept
Thrown in a multi-threading context when an answer is expected from another thread an when the commun...
ThreadDidNotRespondException(const std::source_location Location=std::source_location::current()) noexcept
Thrown when an operation timed out before it could be completed, especially used for locking shared d...
TimeoutException(std::string Description, const ErrorType Type=ErrorType::Warning, const int ErrorCode=DynExpErrorCodes::Timeout, const std::source_location Location=std::source_location::current()) noexcept
Thrown when an attempt was made to convert two incompatible types into each other.
TypeErrorException(const std::source_location Location=std::source_location::current()) noexcept
Thrown when a numeric operation would result in an underflow (e.g. due to incompatible data types)
UnderflowException(std::string Description, const std::source_location Location=std::source_location::current()) noexcept
DynExpErrorCodes
DynExp's error codes
DynExp's Util namespace contains commonly used functions and templates as well as extensions to Qt an...
void ForwardException(std::exception_ptr e)
Wraps the exception passed to the function in a ForwardedException and throws the ForwardedException....
std::ostream & operator<<(std::ostream &stream, const Exception &e)
Writes a DynExp exception in a user-readable way to a stream.
ErrorType
DynExp's error types