raise

Generate and throw an exception.

Additional data can be provided, both for inspection by catching code and for viewing/logging if unhandled.

More...
package @safe
void
raise
(
ExceptionClass
T...
)
(
string msg = ""
,
string file = __FILE__
,
size_t line = __LINE__
)

Parameters

msg string

An optional message concerning the exception.

file string

The file in which the exception was raised.

line size_t

The line number at which the exception was raised.

Detailed Description

Template Parameters

ExceptionClass = The exception class to throw. T... = A list of objects to include as part of the exception.

Meta