Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 3x 3x 3x 3x 3x 3x 3x 3x 3x 5x 5x 3x | export enum ConnectionErrorCode {
ER_CONN_MAX_CONNECTION = "ER_CONN_MAX_CONNECTION",
ER_CONN_NO_AVAILABLE = "ER_CONN_NO_AVAILABLE",
ER_CONN_TIMEOUT = "ER_CONN_TIMEOUT",
ER_CONN_NOT_OPEN = "ER_CONN_NOT_OPEN",
ER_CONN_CLOSED = "ER_CONN_CLOSED",
ER_CONN_SOCKET_NOT_FOUND = "ER_CONN_SOCKET_NOT_FOUND",
}
// extend enum using "extends" keyword
export const ErrorCode = {
...ConnectionErrorCode,
};
export class ConnectionError extends Error {
public code: ConnectionErrorCode;
constructor(message: string, code: ConnectionErrorCode) {
super(message);
this.code = code;
}
}
|