Skip to content

Commit 1c8cc49

Browse files
committed
Updated JSON-LD API to raise exceptions on error. Closes #13.
Updated framing method to return null if there are no matches.
1 parent 7f13ed4 commit 1c8cc49

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/latest/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,8 @@ <h3>JsonLdProcessor</h3>
17351735
according to the steps in the
17361736
<a href="#compaction-algorithm">Compaction Algorithm</a>. The
17371737
<code>input</code> MUST be copied, compacted and returned if there are
1738-
no errors. If the compaction fails, <code>null</code> MUST be returned.
1738+
no errors. If the compaction fails, an appropirate exception MUST be
1739+
thrown.
17391740
<dl class="parameters">
17401741
<dt>object input</dt>
17411742
<dd>The JSON-LD object to perform compaction on.</dd>
@@ -1771,10 +1772,9 @@ <h3>JsonLdProcessor</h3>
17711772
using the <code>frame</code> according to the steps in the
17721773
<a href="#framing-algorithm">Framing Algorithm</a>. The
17731774
<code>input</code> is used to build the framed output and is returned if
1774-
there are no errors. Exceptions are thrown if there are errors.
1775-
<div class="issue">Define what the exceptions are. We need to specify
1776-
whether or not we want exceptions thrown, or errors returned to the
1777-
error callback?</div>
1775+
there are no errors. If there are no matches for the frame,
1776+
<code>null</code> MUST be returned. Exceptions MUST be thrown if there are
1777+
errors.
17781778
<dl class="parameters">
17791779
<dt>object input</dt>
17801780
<dd>The JSON-LD object to perform framing on.</dd>

0 commit comments

Comments
 (0)