rethrow

Catches any exception in the expression and throws a new one specified by E and args

T
rethrow
(
E : Exception
T
Args
)
(
lazy scope T expression
,
Args args
)

Examples

import std.conv;
class MyException : Exception { ... }
"x".to!int().rethrow!MyException("My message");

Meta