Throw a Moya exception. An exception consists of a name in dotted notation with an optional message.
Custom exceptions should be named to start with the long name of the library. Moya reserves exceptions with a single dot for internal use. These may be thrown if appropriate.
<try><throw exception="middle.earth.cant" msg="One can't simply do that!"/></try><except exception="middle.earth.*" dst="error"><echo>Error: ${error.msg}</echo></except>
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
exception |
Type of exception | text | Yes | ||
msg |
Message | text | No | "exception thrown" |
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
default |
Default return for missing keys | expression | No | None |
|
dst |
Destination | reference | No | ||
if |
Conditional expression | expression | No | yes |
|
sequence |
Optional sequence of key / value pairs to initialize the dict | expression | No | None |
|
value |
Value | expression | No | None |