UUIDParsingException

This exception is thrown if an error occurs when parsing a UUID from a string.

class UUIDParsingException : Exception {}

Members

Enums

Reason
enum Reason

The reason why parsing the UUID string failed (if known)

Variables

input
string input;

The original input string which should have been parsed.

position
size_t position;

The position in the input string where the error occurred.

reason
Reason reason;

The reason why parsing the UUID string failed (if known)

Examples

import std.exception : collectException;

const inputUUID = "this-is-an-invalid-uuid";
auto ex = collectException!UUIDParsingException(UUID(inputUUID));
assert(ex !is null); // check that exception was thrown
assert(ex.input == inputUUID);
assert(ex.position == 0);
assert(ex.reason == UUIDParsingException.Reason.tooLittle);

Meta