Skip to content

Commit

Permalink
Define format for error reason string
Browse files Browse the repository at this point in the history
Fixes #227.
  • Loading branch information
jclark committed Jun 20, 2019
1 parent f7c2c80 commit 8b5a06a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,22 @@ <h4>Error</h4>
stack</li>
</ul>
<p>
A <em>module-qualified reason</em> string is a string that has the form
</p>
<pre>
<code>{</code><var>org-name</var><code>/</code><var>module-name</var><code>}</code><var>identifier</var>
</pre>
<p>
where <code><var>org-name</var></code>, <code><var>module-name</var></code> and
<code><var>identifier</var></code> are as defined by the grammar in this
specification, but with no whitespace allowed between tokens. Any reason string
that starts with a <code>{</code> should be a module-qualified reason string.
Any error value that is constructed as the associated value of a panic will use
a module-qualified reason with an org-name of <code>ballerina</code> and a
module-name that starts with <code>lang.</code>, as will any error value
constructed by a function in the lang library.
</p>
<p>
The shape of an error value consists of the shape of the reason and the shape of
the detail; the stack trace is not part of the shape. A type descriptor
error&lt;<var>r</var>, <var>d</var>&gt; contains an error shape if <var>r</var>
Expand Down

0 comments on commit 8b5a06a

Please sign in to comment.