Updated JSON-LD API to raise exceptions on error. Closes #13.
Updated framing method to return null if there are no matches.
--- a/spec/latest/index.html Sun Sep 11 10:21:48 2011 -0400
+++ b/spec/latest/index.html Sun Sep 11 16:25:41 2011 -0400
@@ -1735,7 +1735,8 @@
according to the steps in the
<a href="#compaction-algorithm">Compaction Algorithm</a>. The
<code>input</code> MUST be copied, compacted and returned if there are
- no errors. If the compaction fails, <code>null</code> MUST be returned.
+ no errors. If the compaction fails, an appropirate exception MUST be
+ thrown.
<dl class="parameters">
<dt>object input</dt>
<dd>The JSON-LD object to perform compaction on.</dd>
@@ -1771,10 +1772,9 @@
using the <code>frame</code> according to the steps in the
<a href="#framing-algorithm">Framing Algorithm</a>. The
<code>input</code> is used to build the framed output and is returned if
- there are no errors. Exceptions are thrown if there are errors.
- <div class="issue">Define what the exceptions are. We need to specify
- whether or not we want exceptions thrown, or errors returned to the
- error callback?</div>
+ there are no errors. If there are no matches for the frame,
+ <code>null</code> MUST be returned. Exceptions MUST be thrown if there are
+ errors.
<dl class="parameters">
<dt>object input</dt>
<dd>The JSON-LD object to perform framing on.</dd>