Class: CCEverywhereError<T>
Extends
Error
Type Parameters
Type Parameter |
---|
T |
Constructors
new CCEverywhereError()
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
Overrides
Error.constructor
Accessors
code
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
createErrorFromData()
Copied to your clipboardstatic createErrorFromData<T>(data): CCEverywhereError<T>
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
data | ErrorData <T > |
Returns
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