Documentation ¶
Overview ¶
Package errors describes errors returned by GoThemis functions.
Index ¶
Constants ¶
const ( Success ThemisErrorCode = C.THEMIS_SUCCESS Fail = C.THEMIS_FAIL InvalidParameter = C.THEMIS_INVALID_PARAMETER NoMemory = C.THEMIS_NO_MEMORY BufferTooSmall = C.THEMIS_BUFFER_TOO_SMALL DataCorrupt = C.THEMIS_DATA_CORRUPT InvalidSignature = C.THEMIS_INVALID_SIGNATURE NotSupported = C.THEMIS_NOT_SUPPORTED )
Error code constants.
These are numeric error codes used by Themis Core (see `<themis/themis_error.h>`).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThemisCallbackError ¶
type ThemisCallbackError struct {
// contains filtered or unexported fields
}
ThemisCallbackError is user-generated error returned from Secure Session callback.
func NewCallbackError ¶
func NewCallbackError(msg string) *ThemisCallbackError
NewCallbackError makes an error with provided description.
func (*ThemisCallbackError) Error ¶
func (e *ThemisCallbackError) Error() string
Error returns textual description of the error.
type ThemisError ¶
type ThemisError struct {
// contains filtered or unexported fields
}
ThemisError is a common type of GoThemis errors.
func NewWithCode ¶ added in v0.13.0
func NewWithCode(code ThemisErrorCode, description string) *ThemisError
NewWithCode makes an error with provided numeric code and description.
func (*ThemisError) Code ¶ added in v0.13.0
func (e *ThemisError) Code() ThemisErrorCode
Code returns machine-readable numeric error code.
func (*ThemisError) Error ¶
func (e *ThemisError) Error() string
Error returns human-readable textual description of the error.
type ThemisErrorCode ¶ added in v0.13.0
type ThemisErrorCode int
ThemisErrorCode describes an error reported by Themis Core.