mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
65 lines
1.8 KiB
TypeScript
65 lines
1.8 KiB
TypeScript
import { TransactionIdentifier } from './client/GradidoNode/input.schema'
|
|
import { IdentifierAccount } from './schemas/account.schema'
|
|
|
|
export class GradidoNodeError extends Error {
|
|
constructor(message: string) {
|
|
super(message)
|
|
this.name = 'GradidoNodeError'
|
|
}
|
|
}
|
|
|
|
export class GradidoNodeMissingTransactionError extends GradidoNodeError {
|
|
public transactionIdentifier?: TransactionIdentifier
|
|
constructor(message: string, transactionIdentifier?: TransactionIdentifier) {
|
|
super(message)
|
|
this.name = 'GradidoNodeMissingTransactionError'
|
|
this.transactionIdentifier = transactionIdentifier
|
|
}
|
|
}
|
|
|
|
export class GradidoNodeMissingUserError extends GradidoNodeError {
|
|
public userIdentifier?: IdentifierAccount
|
|
constructor(message: string, userIdentifier?: IdentifierAccount) {
|
|
super(message)
|
|
this.name = 'GradidoNodeMissingUserError'
|
|
this.userIdentifier = userIdentifier
|
|
}
|
|
}
|
|
|
|
export class GradidoNodeInvalidTransactionError extends GradidoNodeError {
|
|
public transactionIdentifier?: TransactionIdentifier
|
|
constructor(message: string, transactionIdentifier?: TransactionIdentifier) {
|
|
super(message)
|
|
this.name = 'GradidoNodeInvalidTransactionError'
|
|
this.transactionIdentifier = transactionIdentifier
|
|
}
|
|
}
|
|
|
|
export class GradidoBlockchainError extends Error {
|
|
constructor(message: string) {
|
|
super(message)
|
|
this.name = 'GradidoBlockchainError'
|
|
}
|
|
}
|
|
|
|
export class GradidoBlockchainCryptoError extends GradidoBlockchainError {
|
|
constructor(message: string) {
|
|
super(message)
|
|
this.name = 'GradidoBlockchainCryptoError'
|
|
}
|
|
}
|
|
|
|
export class ParameterError extends Error {
|
|
constructor(message: string) {
|
|
super(message)
|
|
this.name = 'ParameterError'
|
|
}
|
|
}
|
|
|
|
export class InvalidCallError extends Error {
|
|
constructor(message: string) {
|
|
super(message)
|
|
this.name = 'InvalidCallError'
|
|
}
|
|
}
|