Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file error.ml
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879typedesc=[`Exceptionofexn(*+ exception of the Decode.tuple, variant or record *)|`Unknown_fieldsofstring(*+ type name *)*stringlist(*+ unknown fields *)*Obj.t(*+ value built from the known fields *)|`Unknown_tagofstring(*+ type name *)*string(*+ unknown tag *)|`Required_field_not_foundofstring(*+ type name *)*string(*+ missing fields *)|`Wrong_arityofint(*+ expected *)*int(*+ actual *)*(string*string)option(*+ type name and tag, if tuple, None *)|`Primitive_decoding_failureofstring(*+ message *)|`Sub_decoders_failed_for_one_ofofstring(*+ type name *)]type'targettrace=[`Nodeof'target|`Posofint|`Fieldofstring]listtype'targett=desc*'target*'targettraceopenFormatletrecformat_listsepfppf=function|[]->()|[x]->fppfx|x::xs->fppfx;fprintfppfsep;format_listsepfppfxsletformat_descppf=function|`Exceptionexn->fprintfppf"Exception: %s"(Printexc.to_stringexn)|`Unknown_fields(tyname,fields,_o)->fprintfppf"@[<v2>Unknown fields of type %s:@ [ @[%a@] ]@]"tyname(format_list";@ "(funppf->fprintfppf"%s"))fields|`Unknown_tag(tyname,tag)->fprintfppf"@[<v2>Unknown tag of type %s: %s@]"tynametag|`Required_field_not_found(tyname,field)->fprintfppf"Required field not found of type %s: %s"tynamefield|`Wrong_arity(exp,act,None)->fprintfppf"Wrong arity of tuple %d (expected=%d)"actexp|`Wrong_arity(exp,act,Some(tyname,tag))->fprintfppf"Wrong arity of type %s of tag %s, %d (expected=%d)"tynametagactexp|`Primitive_decoding_failuremes->fprintfppf"Primitive decoding failure: %s"mes|`Sub_decoders_failed_for_one_ofname->fprintfppf"All sub decoders failed for 'one_of' annotated type %s"nameletformat_trace_itemfppf=function|`Posn->fprintfppf"#%d"n|`Fields->fprintfppf".%s"s|`Noden->fprintfppf"@[<2>node@ @[%a@]@]"fnletformat_tracefppf=fprintfppf"@[<v>%a@]"(format_list"@,"(format_trace_itemf))letformatfppf(desc,target,trace:'targett)=fprintfppf"@[<v>Error: %a@,Value: @[%a@]@,Trace:@,%a@]"format_descdescftarget(format_tracef)tracemoduleLocalException(A:sigtypetend)=structexceptionExceptionofA.ttletexnfv=matchfvwith|Okv->v|Errore->raise(Exceptione)letcatchfv=tryOk(fv)withExceptione->Erroreend