Errorf
Creates a new error using an error code and a message.
def Errorf(
errorCode: ErrorCode,
msgFmt: string,
args: interface{}
) - > error
Creates a new error using an error code and a message.
Parameters
| Name | Type | Description |
|---|---|---|
| errorCode | ErrorCode | The specific error code to associate with the new error. |
| msgFmt | string | The format string for the error message, similar to fmt.Sprintf. |
| args | interface{} | Arguments to be formatted into the msgFmt string. |
Returns
| Type | Description |
|---|---|
error | A new error object containing the specified error code and formatted message. |