<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:00:35 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-862] The element and array type operator[] function should not throw</title>
                <link>https://jira.mongodb.org/browse/CXX-862</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;There is an awkward inconsistency in the operator[] interface for bsoncxx::document::element and bsoncxx::document::array.&lt;/p&gt;

&lt;p&gt;If element::operator[] or array::operator[] is called and a matching element is not found, we return an invalid element.&lt;/p&gt;

&lt;p&gt;Similarly, if you call element::operator[] (either overload) and a matching element is not found, we also return an invalid element, as long as the type of the current element is document or array.&lt;/p&gt;

&lt;p&gt;However, if you call element::operator[] (either overload) on something that is neither a document nor an array, an exception is thrown.&lt;/p&gt;

&lt;p&gt;This means that a statement like:&lt;/p&gt;

&lt;p&gt;foo&lt;span class=&quot;error&quot;&gt;&amp;#91;a&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;b&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;c&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;d&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;May either throw or return an invalid element, depending on the shape of the document foo.&lt;/p&gt;

&lt;p&gt;This is pretty hard to handle. We should make it either throw, always, on a missing element, or degrade to an invalid element, always.&lt;/p&gt;</description>
                <environment></environment>
        <key id="271590">CXX-862</key>
            <summary>The element and array type operator[] function should not throw</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="andrew.morrow@mongodb.com">Andrew Morrow</assignee>
                                    <reporter username="andrew.morrow@mongodb.com">Andrew Morrow</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Mar 2016 20:39:14 +0000</created>
                <updated>Mon, 8 Jan 2024 15:30:44 +0000</updated>
                            <resolved>Tue, 22 Mar 2016 16:05:20 +0000</resolved>
                                    <version>3.0.0</version>
                                    <fixVersion>3.0.1</fixVersion>
                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1211596" author="xgen-internal-githook" created="Tue, 22 Mar 2016 18:13:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-862&quot; title=&quot;The element and array type operator[] function should not throw&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-862&quot;&gt;&lt;del&gt;CXX-862&lt;/del&gt;&lt;/a&gt; Fixup formatting&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/47608de0d7507784fca50f9d57c78b24be29bd88&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/47608de0d7507784fca50f9d57c78b24be29bd88&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1211425" author="xgen-internal-githook" created="Tue, 22 Mar 2016 16:37:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-862&quot; title=&quot;The element and array type operator[] function should not throw&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-862&quot;&gt;&lt;del&gt;CXX-862&lt;/del&gt;&lt;/a&gt; Fixup example after changes&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/229e91fd37928da9c00d648b047e62b507489dae&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/229e91fd37928da9c00d648b047e62b507489dae&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1211321" author="xgen-internal-githook" created="Tue, 22 Mar 2016 16:03:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;acmorrow&apos;, u&apos;name&apos;: u&apos;Andrew Morrow&apos;, u&apos;email&apos;: u&apos;acm@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-862&quot; title=&quot;The element and array type operator[] function should not throw&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-862&quot;&gt;&lt;del&gt;CXX-862&lt;/del&gt;&lt;/a&gt; Don&apos;t throw on invalid element access by index or key&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/9738aef1169b03cdbb54fd0fe789adce4a1df1df&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/9738aef1169b03cdbb54fd0fe789adce4a1df1df&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1210217" author="acm" created="Mon, 21 Mar 2016 20:51:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/471&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/471&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsjl9j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="941">Platforms 12 (04/01/16)</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>