The Open
D
Programming Language
Learn
Language
Library
Contribute
Blog
enforce.enforce
std
exception
enforce
T
enforce
(T value, const(char)[] msg, string file, size_t line)
template
enforce
(E : Throwable = Exception)
T
enforce
(
T
)
(
T
value
,
lazy
const
(
char
)[]
msg
= null
,
string
file
= __FILE__
,
size_t
line
= __LINE__
)
if
(
is
(
typeof
( ))
)
if
(
is
(
typeof
(new
E
("",
string.init
,
size_t.init
)) :
Throwable
) ||
is
(
typeof
(new
E
(
string.init
,
size_t.init
)) :
Throwable
)
)
T
enforce
(T value, Dg dg)
T
enforce
(T value, Throwable ex)
Meta
Source
See Implementation
std
exception
enforce
functions
enforce