GcryptException

Reusable exception class

Members

Functions

throwIfGcryptError
void throwIfGcryptError(gcry_error_t error, string file, int line)

Throw if variable error indicates an error. The exception message is set to contain the error from libgcrypt.

throwIfLenMismatch
void throwIfLenMismatch(cstring id, size_t len, size_t expected, string file, int line)

Throw if len != expected, with exception message explaining the issue.

Mixins

__anonymous
mixin ReusableExceptionImplementation!()

Mixin the reusable exception parts

Static functions

throwNewIfGcryptError
void throwNewIfGcryptError(gcry_error_t error, string file, int line)

Throws a new instance of this class if error indicates an error. The exception message is set to contain the error from libgcrypt.

Mixed In Members

From mixin ReusableExceptionImplementation!()

ocean.meta.types.Qualifiers
public import ocean.meta.types.Qualifiers;
Undocumented in source.
ocean.core.Buffer
public import ocean.core.Buffer;
Undocumented in source.
ocean.core.array.Mutation
public static import ocean.core.array.Mutation;
Undocumented in source.
ocean.text.convert.Formatter
public static import ocean.text.convert.Formatter;
Undocumented in source.
ocean.text.convert.Integer_tango
public static import ocean.text.convert.Integer_tango;
Undocumented in source.
reused_msg
Buffer!(char) reused_msg;

Fields used instead of msg for mutable messages. Exception.msg has string type thus can't be overwritten with new data

this
this(size_t size)

Constructs exception object with mutable buffer pre-allocated to length size and other fields kept invalid.

set
typeof(this) set(cstring msg, string file, long line)

Sets exception information for this instance.

enforce
void enforce(T ok, cstring msg, string file, long line)

Throws this instance if ok is false, 0 or null.

message
cstring message()
append
typeof(this) append(cstring msg)

Appends new substring to mutable exception message

append
typeof(this) append(long num, bool hex)

Appends an integer to mutable exception message

fmtAppend
typeof(this) fmtAppend(cstring fmt, Args args)

Appends formatted string

Meta