PgError

Error container * API is stable

Members

Properties

code
int code [@property getter]

Error code

empty
bool empty [@property getter]

Returns true if no error, otherwise false

msg
const(string) msg [@property getter]

Error text

Examples

1 PgError empty;
2 
3 assert(empty.empty);
4 assert(!empty);
5 assert(empty.code == -1);
6 assert(empty.msg  == "");
7 
8 
9 auto error = PgError("Some error", 100);
10 
11 assert(error);
12 assert(!error.empty);
13 assert(error.code == 100);
14 assert(error.msg  == "Some error");

Meta