Kayrock.ErrorCode (kayrock v0.1.15) View Source
Utility for converting Kafka error codes to/from atom names
Note the actual error code values are determined by :kpro_schema.c/1
.
Currently covering the range -1 to 71.
Link to this section Summary
Functions
Converts an atom to a numeric error code
Converts an atom to a numeric error code, raising an
Kayrock.ErrorCode.InvalidAtomException
if an unknown atom is supplied
Converts an error code to an atom
Converts an error code to an atom, raising an
Kayrock.ErrorCode.InvalidErrorCodeException
if an unknown error code is supplied
Link to this section Types
Link to this section Functions
Specs
atom_to_code(error_atom()) :: error_code() | nil
Converts an atom to a numeric error code
Returns nil if an unknown atom is supplied
Specs
atom_to_code!(error_atom()) :: error_code()
Converts an atom to a numeric error code, raising an
Kayrock.ErrorCode.InvalidAtomException
if an unknown atom is supplied
Specs
code_to_atom(error_code()) :: error_atom()
Converts an error code to an atom
An unknown code results in a return of :unknown
Specs
code_to_atom!(error_code()) :: error_atom()
Converts an error code to an atom, raising an
Kayrock.ErrorCode.InvalidErrorCodeException
if an unknown error code is supplied
Specs
unknown_topic() :: error_code()