<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[STL Exceptions]]></title><description><![CDATA[<p>Hoi,</p>
<p>gibt es in der STL einen Exception Typ für &quot;die Funktion hat falsche Parameter erhalten&quot;. Quasi sowas:</p>
<p>float sqrt(int value) { if(value &lt; 0) throw stl::bad_arguments(); /* ... */ }</p>
<p>Oder muss ich mir das selber bauen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/193122/stl-exceptions</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 19:48:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/193122.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 22 Sep 2007 11:38:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to STL Exceptions on Sat, 22 Sep 2007 11:38:54 GMT]]></title><description><![CDATA[<p>Hoi,</p>
<p>gibt es in der STL einen Exception Typ für &quot;die Funktion hat falsche Parameter erhalten&quot;. Quasi sowas:</p>
<p>float sqrt(int value) { if(value &lt; 0) throw stl::bad_arguments(); /* ... */ }</p>
<p>Oder muss ich mir das selber bauen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370613</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370613</guid><dc:creator><![CDATA[Except0r]]></dc:creator><pubDate>Sat, 22 Sep 2007 11:38:54 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Sat, 22 Sep 2007 12:00:25 GMT]]></title><description><![CDATA[<p>Such dir einen passenden raus:<br />
<a href="http://www.kharchi.de/cppratgeber3.htm#3.3_Standard_Exceptions" rel="nofollow">http://www.kharchi.de/cppratgeber3.htm#3.3_Standard_Exceptions</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370626</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370626</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Sat, 22 Sep 2007 12:00:25 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Sat, 22 Sep 2007 20:15:03 GMT]]></title><description><![CDATA[<p>Da passt assert aber besser.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370813</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370813</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Sat, 22 Sep 2007 20:15:03 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Sun, 23 Sep 2007 06:26:29 GMT]]></title><description><![CDATA[<p>assert geht doch nur im debug-modus, oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370900</guid><dc:creator><![CDATA[ghorst]]></dc:creator><pubDate>Sun, 23 Sep 2007 06:26:29 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Sun, 23 Sep 2007 07:52:16 GMT]]></title><description><![CDATA[<p>normalerweise schon ja. und ich find ne exception irgendwie schicker. wenns nur darum geht, ob nen wert kleiner als 0 ist, kann man vor aufruf ja noch ne kleine überprüfung machen. aber wenns aufwendigere methoden werden, dann wird die überprüfung von nutzereingaben etc. drastisch aufwendiger. mit ner anständigen illegal_argument (oder wie die auch immer heisst) exception kann man als entwickler jeden x-beliebigen wert reinballen, die exception fangen und sein alternativprogramm fahren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370915</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Sun, 23 Sep 2007 07:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Sun, 23 Sep 2007 15:19:23 GMT]]></title><description><![CDATA[<p>Die &quot;illegal_argument&quot; Exception heisst std::invalid_argument.<br />
Ich verwende allerdings bei sowas auch eher assert() - macht schliesslich keinen Sinn an 1000 Stellen zu prüfen ob auch alle Parameter OK sind - verschlingt nur sinnlos Rechenzeit.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371070</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371070</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Sun, 23 Sep 2007 15:19:23 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Sun, 23 Sep 2007 16:23:32 GMT]]></title><description><![CDATA[<p>aus meiner sicht hängt es davon ab, was die funktion machen soll.<br />
ich persönlich bin ein feind von prüfungen vor dem funktionsaufruf, da man dort gerne etwas vergisst oder die prüfung generell verschlampt, daher ist eine exception in der funktion für mich die sinnvollste prüfung der argumente. allerdings gilt dieses nur, wenn es nicht performance-kritisch ist bzw. deutlich als ungeprüft gekennzeichnet ist, wie bsp der operator[].</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371090</guid><dc:creator><![CDATA[ghorst]]></dc:creator><pubDate>Sun, 23 Sep 2007 16:23:32 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Sun, 23 Sep 2007 17:37:15 GMT]]></title><description><![CDATA[<p>also mal ganz ehrlich; 95% aller anwendungen holt sich eh alle daten aus ner datenbank und der zugriff ist um faktor 1000 langsamer als jeglicher funktionsaufruf.<br />
ne exception ist anständig zu behandeln und sorgt für einfach verständlichen und wartbaren code. glaub eh, dass der performance wahn ne c krankheit ist :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371129</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371129</guid><dc:creator><![CDATA[thordk]]></dc:creator><pubDate>Sun, 23 Sep 2007 17:37:15 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Sun, 23 Sep 2007 17:46:28 GMT]]></title><description><![CDATA[<p>Muss ich zum benutzen von assert() selber NDEBUG definieren oder macht das mein Compiler (VS 2005) automatisch wenn ich im jeweiligen Kompiliermodus (DEBUG/RELEASE) bin?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371139</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371139</guid><dc:creator><![CDATA[Except0r]]></dc:creator><pubDate>Sun, 23 Sep 2007 17:46:28 GMT</pubDate></item><item><title><![CDATA[Reply to STL Exceptions on Mon, 24 Sep 2007 11:01:31 GMT]]></title><description><![CDATA[<p>VS 2005 macht das insofern &quot;automatisch&quot; als dass bei neuen Projekten entsprechende Einträge in der &quot;Debug&quot; Konfiguration gemacht werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371519</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371519</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 24 Sep 2007 11:01:31 GMT</pubDate></item></channel></rss>