Lysa  0.0
Lysa 3D Engine
Exception Class Referencefinal

Detailed Description

Lightweight exception type.

This class is a small convenience wrapper around std::exception that stores a formatted message assembled from any streamable arguments. In debug builds on Windows, if a debugger is attached, the message is also sent to the debugger output and a debug break is triggered to help you stop exactly at the throw site.

+ Inheritance diagram for Exception:

Public Member Functions

template<typename... Args>
 Exception (Args &&...args)
 
const char * what () const noexcept override
 

Constructor & Destructor Documentation

Exception ( Args &&...  args)
inlineexplicit

Construct an Exception from streamable parts.

The message is created by streaming all provided arguments into an internal std::ostringstream, in order. Each argument must be stream-insertable (operator<< available).

In debug builds, the resulting message may be emitted to the debugger output and a debug trap/break may be triggered.

Parameters
argsVariadic list of streamable argument types.

Member Function Documentation

const char* what ( ) const
inlineoverridenoexcept

Get a C-string describing the error.

Returns
Null-terminated string containing the stored message.