@shapeshiftoss/fiosdk
Version:
The Foundation for Interwallet Operability (FIO) is a consortium of leading blockchain wallets, exchanges and payments providers that seeks to accelerate blockchain adoption by reducing the risk, complexity, and inconvenience of sending and receiving cryp
20 lines (15 loc) • 362 B
text/typescript
export type ErrObj = {
field: string,
message: string
}
export class ValidationError extends Error {
public list: ErrObj[] = []
constructor(list: ErrObj[], ...params: any) {
super(...params)
if (Error.captureStackTrace) {
Error.captureStackTrace(this, ValidationError)
}
this.name = 'ValidationError'
this.list = list
}
}