|
|
|
|
|
Varda use Result<Ok,Error> to represents errors that can be handle by the programmer. For instance, this covers all communication errors due to network that can occures when using Varda communication primitives. On the contrary, unrecoverable error of the runtime that cames from behaviours that does not respect the semantics of the plugin will trigger failure in the target runtime (or language) without encoding to Varda. For instance, the AkkaJava could raise exceptions.
|
|
|
|
|
|
## Error-handling
|
|
|
|
|
|
|
... | ... | @@ -19,7 +22,7 @@ method tret method_name (targ_1 arg1, ..., targ_n arg_n) { |
|
|
}
|
|
|
```
|
|
|
|
|
|
``tret = Result<tval, terr>`` and $[|e?|] = \text{if e is_ok then e else return error}$
|
|
|
``tret = Result<tval, terr>`` and $[|e?|] = \text{if e is_ok then e.get() else return Err(e.get() -> important change le type du ok)}$
|
|
|
|
|
|
|
|
|
|
... | ... | @@ -30,4 +33,6 @@ Builtin functions generating error: |
|
|
* fire
|
|
|
* receive
|
|
|
* select
|
|
|
* initiate_ |
|
|
\ No newline at end of file |
|
|
* initiate_
|
|
|
|
|
|
## Failure |
|
|
\ No newline at end of file |