Update error handling behavior to latest resolution
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 19 Dec 2012 15:10:27 +0100
changeset 1064 4e6c300d6c88
parent 1063 daebe5dc6449
child 1065 eff829dcd859
Update error handling behavior to latest resolution

There have been some discussions to introduce flags to report warnings etc. We do not have a final resolution for this so it might be changed again.

This addresses #153.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Wed Dec 19 14:52:50 2012 +0100
+++ b/spec/latest/json-ld-api/index.html	Wed Dec 19 15:10:27 2012 +0100
@@ -2091,17 +2091,15 @@
   <section>
     <h3>Callbacks</h3>
 
-    <p class="issue" data-number="153">Developers should note that the details of
-      error handling are being actively debated.</p>
-
     <p>JSON-LD processors utilize callbacks in order to return information in an
       asynchronous manner to calling applications. This section details the
       parameters sent to those callbacks.</p>
 
     <section>
       <h3>JsonLdCallback</h3>
-      <p>The JsonLdCallback is used to return a processed JSON-LD
-        representation as the result of processing an API method.</p>
+      <p>The <a>JsonLdCallback</a> is called when processing of an API method
+        of <a>JsonLdProcessor</a> has been completed successfully or been
+        terminated by an error.</p>
 
       <dl title="callback JsonLdCallback = void" class="idl">
         <dt>JsonLdProcessingError error</dt>
@@ -2163,26 +2161,21 @@
 
     <section>
       <h3>JsonLdProcessingError</h3>
-      <p>The JsonLdProcessingError type is used to encapsulate a variety of
-      parameters that outline the cause of a particular
-      <a>JsonLdProcessor</a> error.</p>
+
+      <p class="issue" data-number="153">Developers should note that the details of
+        error handling are being actively debated.</p>
+
+      <p>The <a>JsonLdProcessingError</a> type is used to report errors to a
+        <a>JsonLdCallback</a>.</p>
 
       <dl title="dictionary JsonLdProcessingError" class="idl">
         <dt>JsonLdErrorCode code</dt>
         <dd>a string representing the particular error type, as described in
           the various algorithms in this document.</dd>
-        <dt>DOMString operation</dt>
-        <dd>a string representing the operation that was being performed
-          when the conformance issue was raised. Valid values for the
-          string include <code>compact</code>, and <code>expand</code>.</dd>
-        <dt>object or object[] source</dt>
-          <dd>An object reference to the original JSON-LD document being
-          processed.</dd>
-        <dt>DOMString sourceKey</dt>
-          <dd>The key value associated with the value that triggered the
-          conformance issue.</dd>
-        <dt>any or any[] sourceValue</dt>
-          <dd>The value that triggered the conformance issue.</dd>
+        <dt>DOMString? message</dt>
+        <dd>an optional error message containing additional debugging information.
+          The specific contents of error messages are outside the scope of this
+          specification and thus implementation dependent.</dd>
       </dl>
     </section>