The reason why parsing the UUID string failed (if known)
The original input string which should have been parsed.
The position in the input string where the error occurred.
The reason why parsing the UUID string failed (if known)
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);
This exception is thrown if an error occurs when parsing a UUID from a string.