Zilliqa / ZRC

Zilliqa Reference Contracts
MIT License
40 stars 57 forks source link

docs(zrc-6): event -> exception #141

Closed ghost closed 2 years ago

ghost commented 2 years ago

This PR fixes the Error Code description by replacing Error event -> Error exception.

scilla-doc explains error event with the following example. https://scilla.readthedocs.io/en/latest/scilla-by-example.html?highlight=error%20event%20#procedures

procedure DonationEvent (failure : Bool, error_code : Int32)
  match failure with
  | False =>
    e = {_eventname : "DonationSuccess"; donor : _sender;
         amount : _amount; code : accepted_code};
    event e
  | True =>
    e = {_eventname : "DonationFailure"; donor : _sender;
         amount : _amount; code : error_code};
    event e
  end
end