update
This commit is contained in:
@ -33,6 +33,16 @@ export class MtaConnectionError extends NetworkError {
|
||||
) {
|
||||
super(message, MTA_CONNECTION_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof MtaConnectionError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance for a DNS resolution error
|
||||
@ -136,6 +146,16 @@ export class MtaAuthenticationError extends AuthenticationError {
|
||||
) {
|
||||
super(message, MTA_AUTHENTICATION_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof MtaAuthenticationError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance for invalid credentials
|
||||
@ -209,6 +229,16 @@ export class MtaDeliveryError extends OperationError {
|
||||
) {
|
||||
super(message, MTA_DELIVERY_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof MtaDeliveryError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance for a permanent delivery failure
|
||||
@ -322,6 +352,16 @@ export class MtaConfigurationError extends ConfigurationError {
|
||||
) {
|
||||
super(message, MTA_CONFIGURATION_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof MtaConfigurationError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance for a missing configuration value
|
||||
@ -392,6 +432,16 @@ export class MtaDnsError extends NetworkError {
|
||||
) {
|
||||
super(message, MTA_DNS_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof MtaDnsError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance for an MX record lookup failure
|
||||
@ -477,6 +527,16 @@ export class MtaTimeoutError extends NetworkError {
|
||||
) {
|
||||
super(message, MTA_TIMEOUT_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof MtaTimeoutError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance for an SMTP command timeout
|
||||
@ -550,6 +610,16 @@ export class MtaProtocolError extends OperationError {
|
||||
) {
|
||||
super(message, MTA_PROTOCOL_ERROR, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance with updated context
|
||||
*/
|
||||
protected createWithContext(context: IErrorContext): PlatformError {
|
||||
return new (this.constructor as typeof MtaProtocolError)(
|
||||
this.message,
|
||||
context
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance for an unexpected server response
|
||||
|
Reference in New Issue
Block a user