Class: CCEverywhereError<T>
Extends
Error
Type Parameters
| Type Parameter |
|---|
T |
Constructors
Constructor
Copied to your clipboardnew CCEverywhereError<T>(code,message?,subError?,customData?): CCEverywhereError<T>;
Constructor
Parameters
| Parameter | Type | Description |
|---|---|---|
code | T | The error code associated with this error. |
message? | string | The message associated with this error. |
subError? | string | number | Error | Source error or a number tell more about the error. |
customData? | unknown | Any kind of custom data related to error, which is converted to valid JSON |
Returns
CCEverywhereError<T>
Overrides
Copied to your clipboardError.constructor
Accessors
code
Get Signature
Copied to your clipboardget code(): T;
getter code
Returns
T
Methods
create()
Copied to your clipboardstatic create<T>(errorCodeMessage,subError?,customData?): CCEverywhereError<T>;
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
errorCodeMessage | |
subError? | string | number | Error |
customData? | unknown |
Returns
CCEverywhereError<T>
createErrorFromData()
Copied to your clipboardstatic createErrorFromData<T>(data): CCEverywhereError<T>;
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
data | ErrorData<T> |
Returns
CCEverywhereError<T>
toData()
Copied to your clipboardtoData(): ErrorData<T>;
Get a plain-object representation of the error..
Returns
ErrorData<T>
toString()
Copied to your clipboardtoString(): string;
Get complete message
Returns
string
