tezos-base
Tezos: meta-package and pervasive type definitions for Tezos
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library tezos-base
Parameters
module Prefix : Tezos_error_monad.Sig.PREFIX
Signature
include Tezos_error_monad.Sig.CORE
val error_encoding : error Data_encoding.t
val pp : Format.formatter -> error -> unit
val register_error_kind :
Tezos_error_monad.Sig.error_category ->
id:string ->
title:string ->
description:string ->
?pp:( Format.formatter -> 'err -> unit ) ->
'err Data_encoding.t ->
( error -> 'err option ) ->
( 'err -> error ) ->
unit
The error data type is extensible. Each module can register specialized error serializers id
unique name of this error. Ex.: overflow_time_counter title
more readable name. Ex.: Overflow of time counter description
human readable description. Ex.: The time counter overflowed while computing delta increase pp
formatter used to pretty print additional arguments. Ex.: The time counter overflowed while computing delta increase. Previous value %d. Delta: %d encoder
decoder
data encoding for this error. If the error has no value, specify Data_encoding.empty
val classify_error : error -> Tezos_error_monad.Sig.error_category
Classify an error using the registered kinds
include Tezos_error_monad.Sig.EXT with type error := error
Catch all error when 'serializing' an error.
val json_of_error : error -> Data_encoding.json
An error serializer
val error_of_json : Data_encoding.json -> error
Error documentation
type error_info = {
category : Tezos_error_monad.Sig.error_category; |
id : string; |
title : string; |
description : string; |
schema : Data_encoding.json_schema; |
}
Error information
val pp_info : Format.formatter -> error_info -> unit
val get_registered_errors : unit -> error_info list
Retrieves information of registered errors
include Tezos_error_monad.Sig.WITH_WRAPPED with type error := error
module type Wrapped_error_monad = sig ... end
val register_wrapped_error_kind :
(module Wrapped_error_monad) ->
id:string ->
title:string ->
description:string ->
unit