Michelson: add registration for Overflow + some comments
This commit is contained in:
parent
75f29f4a05
commit
21c4cc6e69
@ -24,6 +24,7 @@ type error += Runtime_contract_error : Contract.t * Script.expr -> error
|
|||||||
|
|
||||||
let () =
|
let () =
|
||||||
let open Data_encoding in
|
let open Data_encoding in
|
||||||
|
(* Reject *)
|
||||||
register_error_kind
|
register_error_kind
|
||||||
`Temporary
|
`Temporary
|
||||||
~id:"scriptRejectedRuntimeError"
|
~id:"scriptRejectedRuntimeError"
|
||||||
@ -32,6 +33,16 @@ let () =
|
|||||||
(obj1 (req "location" Script.location_encoding))
|
(obj1 (req "location" Script.location_encoding))
|
||||||
(function Reject loc -> Some loc | _ -> None)
|
(function Reject loc -> Some loc | _ -> None)
|
||||||
(fun loc -> Reject loc);
|
(fun loc -> Reject loc);
|
||||||
|
(* Overflow *)
|
||||||
|
register_error_kind
|
||||||
|
`Temporary
|
||||||
|
~id:"scriptOverflowRuntimeError"
|
||||||
|
~title: "Script failed (overflow error)"
|
||||||
|
~description: "A FAIL instruction was reached due to the detection of an overflow"
|
||||||
|
(obj1 (req "location" Script.location_encoding))
|
||||||
|
(function Overflow loc -> Some loc | _ -> None)
|
||||||
|
(fun loc -> Overflow loc);
|
||||||
|
(* Runtime contract error *)
|
||||||
register_error_kind
|
register_error_kind
|
||||||
`Temporary
|
`Temporary
|
||||||
~id:"scriptRuntimeError"
|
~id:"scriptRuntimeError"
|
||||||
|
Loading…
Reference in New Issue
Block a user