Call.throws

Creates an exception of type E and throws it when the method which matches this expectation is called.

  1. typeof(this) throws(Exception exception)
  2. typeof(this) throws(string msg, string file, size_t line)
    mixintemplate Call(alias F)
    ref
    typeof(this)
    throws
    (
    E : Exception = Exception
    )
    (
    string msg
    ,
    string file = __FILE__
    ,
    size_t line = __LINE__
    )

Parameters

E

Exception type to throw.

msg string

The error message to put in the exception if it is thrown.

file string

The source file of the caller.

line size_t

The line number of the caller.

Return Value

Type: typeof(this)

$(D_KEYWORD this).

Meta