class BaseError extends Error { public constructor ( public name , public reason ? , public info ? ) { super ( reason ) ; Error . captureStackTrace ( this , BaseError ) ; } } const reason = ( error ? ) => ( error instanceof Error ? error . message : error ) ; export class ServerError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'ServerError' , reason ( error ) , info ) ; } } export class NotFoundError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'NotFoundError' , reason ( error ) , info ) ; } } export class ConflictError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'ConflictError' , reason ( error ) , info ) ; } } export class AuthorizationError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'AuthorizationError' , reason ( error ) , info ) ; } } export class RuntimeError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'RuntimeError' , reason ( error ) , info ) ; } } export class ValidationError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'ValidationError' , reason ( error ) , info ) ; } } export class BadParamsError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'BadParamsError' , reason ( error ) , info ) ; } } export class AlreadyPublishedError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'AlreadyPublishedError' , reason ( error ) , info ) ; } } export class UnsupportedTypeError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'UnsupportedTypeError' , reason ( error ) , info ) ; } } export class ParseError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'ParseError' , reason ( error ) , info ) ; } } export class DependencyMissingError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'DependencyMissingError' , reason ( error ) , info ) ; } } export class InsufficientPermissionsError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'InsufficientPermissionsError' , reason ( error ) , info ) ; } } export class ClientDisconnectedError extends BaseError { public constructor ( error ? , public info ? ) { super ( 'ClientDisconnectedError' , reason ( error ) , info ) ; } }