From 8b5a06ad26f599d9ece7bd30e968c827f7154003 Mon Sep 17 00:00:00 2001 From: James Clark Date: Thu, 20 Jun 2019 16:32:09 +0700 Subject: [PATCH] Define format for error reason string Fixes #227. --- lang/spec.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lang/spec.html b/lang/spec.html index afcee5e7..65e24d44 100644 --- a/lang/spec.html +++ b/lang/spec.html @@ -1187,6 +1187,22 @@

Error

stack

+A module-qualified reason string is a string that has the form +

+
+   {org-name/module-name}identifier
+
+

+where org-name, module-name and +identifier are as defined by the grammar in this +specification, but with no whitespace allowed between tokens. Any reason string +that starts with a { 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 ballerina and a +module-name that starts with lang., as will any error value +constructed by a function in the lang library. +

+

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<r, d> contains an error shape if r