<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:00:09 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-742] client::database() should raise an exception if client is unitialized</title>
                <link>https://jira.mongodb.org/browse/CXX-742</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;If the database method of the client class is called for a client that is not properly initialized, the call segfaults. A check should be added for this condition and the error should be handled gracefully.&lt;/p&gt;</description>
                <environment></environment>
        <key id="240900">CXX-742</key>
            <summary>client::database() should raise an exception if client is unitialized</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="tess.avitabile@mongodb.com">Tess Avitabile</assignee>
                                    <reporter username="sdeerwester">Scott Deerwester</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Nov 2015 13:45:50 +0000</created>
                <updated>Mon, 11 Jan 2016 22:35:09 +0000</updated>
                            <resolved>Tue, 22 Dec 2015 20:05:12 +0000</resolved>
                                    <version>0.2.0</version>
                                    <fixVersion>3.0.0-rc0</fixVersion>
                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1120850" author="xgen-internal-githook" created="Tue, 22 Dec 2015 20:04:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;tessavitabile&apos;, u&apos;name&apos;: u&apos;Tess Avitabile&apos;, u&apos;email&apos;: u&apos;tess.avitabile@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CXX-742&quot; title=&quot;client::database() should raise an exception if client is unitialized&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CXX-742&quot;&gt;&lt;del&gt;CXX-742&lt;/del&gt;&lt;/a&gt; - Throw logic_error for use of invalid client, collection or database&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/commit/a63863b7095c7970b8f2e3201936281551026781&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/commit/a63863b7095c7970b8f2e3201936281551026781&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1119548" author="tess.avitabile" created="Mon, 21 Dec 2015 16:25:09 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/pull/405&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/pull/405&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1117489" author="tess.avitabile" created="Thu, 17 Dec 2015 19:51:14 +0000"  >&lt;p&gt;Sounds good!&lt;/p&gt;</comment>
                            <comment id="1117481" author="acm" created="Thu, 17 Dec 2015 19:49:39 +0000"  >&lt;p&gt;By &apos;goes well&apos;, I mean put it up for review with the changes just to database, and if we agree on the approach extend it to the other types.&lt;/p&gt;</comment>
                            <comment id="1117480" author="acm" created="Thu, 17 Dec 2015 19:48:57 +0000"  >&lt;p&gt;Seems reasonable. Why don&apos;t you try it with mongocxx::database, and if it goes well, do the same for client and collection?&lt;/p&gt;</comment>
                            <comment id="1117470" author="tess.avitabile" created="Thu, 17 Dec 2015 19:43:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=acm&quot; class=&quot;user-hover&quot; rel=&quot;acm&quot;&gt;acm&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=samantha.ritter&quot; class=&quot;user-hover&quot; rel=&quot;samantha.ritter&quot;&gt;samantha.ritter&lt;/a&gt;: Do you think this should be done the way Andrew suggested, with the private accessor returning an impl pointer?&lt;/p&gt;</comment>
                            <comment id="1100730" author="acm" created="Mon, 30 Nov 2015 15:57:10 +0000"  >&lt;p&gt;So, this is one we should think about. Calling any method on a default constructed client, database, or collection is currently illegal. To detect that would require us to add a check to (almost) every method on those classes. Easiest way to do that might be to add a private accessor that returns the impl pointer, use that everywhere we access it, and add the check to the accessor. Or, just document that using default initialized versions of these classes is illegal.&lt;/p&gt;

&lt;p&gt;I get why this change was requested, because making the use of a default constructed one of these objects illegal is surprising. However, nobody would be surprised that using a moved-from one of these objects was surprising. The default constructors were added exactly to allow creating an empty client/database/collection that could later be assigned to, deferring the real initialization.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10020">
                    <name>Gantt Dependency</name>
                                                                <inwardlinks description="has to be done after">
                                        <issuelink>
            <issuekey id="215631">CXX-627</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CXX-668</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrdsgn:</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="756">Platform D (12/11/15)</customfieldvalue>
    <customfieldvalue id="801">Platforms E (01/08/16)</customfieldvalue>

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