svn: /phpdoc/en/trunk/reference/mongodb/functions/bson/ fromjson.xml tojson.xml
| From: | Jeremy Mikola | Date: | Tue, 10 Nov 2015 20:52:44 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mongodb/functions/bson/ fromjson.xml tojson.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13835@lists.php.net to get a copy of this message | ||
jmikola Tue, 10 Nov 2015 20:52:44 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=338104
Log:
MongoDB\BSON\fromJSON() and toJSON() throw on error
Changed paths:
U phpdoc/en/trunk/reference/mongodb/functions/bson/fromjson.xml
U phpdoc/en/trunk/reference/mongodb/functions/bson/tojson.xml
Modified: phpdoc/en/trunk/reference/mongodb/functions/bson/fromjson.xml
===================================================================
--- phpdoc/en/trunk/reference/mongodb/functions/bson/fromjson.xml 2015-11-10 10:05:47 UTC (rev
338103)
+++ phpdoc/en/trunk/reference/mongodb/functions/bson/fromjson.xml 2015-11-10 20:52:44 UTC (rev
338104)
@@ -37,10 +37,19 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- The serialized BSON document as a binary string. &null; is returned on error.
+ The serialized BSON document as a binary string.
</para>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ Throws
+ <classname>MongoDB\Driver\Exception\UnexpectedValueException</classname> if
+ the JSON value cannot be converted to BSON (e.g. due to a syntax error).
+ </para>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<example>
Modified: phpdoc/en/trunk/reference/mongodb/functions/bson/tojson.xml
===================================================================
--- phpdoc/en/trunk/reference/mongodb/functions/bson/tojson.xml 2015-11-10 10:05:47 UTC (rev 338103)
+++ phpdoc/en/trunk/reference/mongodb/functions/bson/tojson.xml 2015-11-10 20:52:44 UTC (rev 338104)
@@ -37,10 +37,22 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- The converted JSON value. &null; is returned on error.
+ The converted JSON value.
</para>
</refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ Throws
+ <classname>MongoDB\Driver\Exception\UnexpectedValueException</classname> if
+ the input did not contain exactly one BSON document. Possible reasons
+ include, but are not limited to, invalid BSON, extra data (after reading one
+ BSON document), or an unexpected
+ <link xlink:href="&url.mongodb.libbson;">libbson</link> error.
+ </para>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<example>