2020-11-29 14:28:30 +00:00
|
|
|
/**
|
2020-11-30 00:20:52 +00:00
|
|
|
* This error should not be ignored by the functional interface
|
|
|
|
* try / catch blocks, to prevent false negatives
|
2020-11-29 14:28:30 +00:00
|
|
|
*/
|
2020-11-30 00:20:52 +00:00
|
|
|
export class NotInitializedError extends Error {
|
|
|
|
constructor(implementation: string) {
|
|
|
|
super(`NOT_INITIALIZED: ${implementation}`);
|
|
|
|
}
|
|
|
|
}
|
2020-11-29 23:35:42 +00:00
|
|
|
|
2020-11-30 18:01:13 +00:00
|
|
|
export class ZeroSecretKeyError extends Error {
|
2020-11-29 23:35:42 +00:00
|
|
|
constructor() {
|
2020-11-30 18:01:13 +00:00
|
|
|
super("ZERO_SECRET_KEY");
|
2020-11-29 23:35:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class ZeroPublicKeyError extends Error {
|
|
|
|
constructor() {
|
2020-11-30 00:20:52 +00:00
|
|
|
super("ZERO_PUBLIC_KEY");
|
2020-11-29 23:35:42 +00:00
|
|
|
}
|
|
|
|
}
|
2020-11-30 00:01:48 +00:00
|
|
|
|
|
|
|
export class ZeroSignatureError extends Error {
|
|
|
|
constructor() {
|
2020-11-30 00:20:52 +00:00
|
|
|
super("ZERO_SIGNATURE");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class EmptyAggregateError extends Error {
|
|
|
|
constructor() {
|
|
|
|
super("EMPTY_AGGREGATE_ARRAY");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class InvalidOrderError extends Error {
|
|
|
|
constructor() {
|
|
|
|
super("INVALID_ORDER");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class InvalidLengthError extends Error {
|
|
|
|
constructor(arg: string, length: number) {
|
|
|
|
super(`INVALID_LENGTH: ${arg} must have ${length} bytes`);
|
2020-11-30 00:01:48 +00:00
|
|
|
}
|
|
|
|
}
|