<?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[Pythonfrage ( alle exceptions abfangen???)]]></title><description><![CDATA[<p>im Grunde genommen, meldet sich der Interpreter bei einer nicht-abgefangenen Exception mit einer deutlichen Fehlerbeschreibung</p>
<p>weil, wenn man alle exceptions abfangen würde, dann wäre praktisch der gesamte code in try blöcken, welchen ein except folgt</p>
<p>Also wie macht ihr es, bzw wie soll man es am besten machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/159842/pythonfrage-alle-exceptions-abfangen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Jul 2026 17:53:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/159842.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Sep 2006 13:41:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Tue, 19 Sep 2006 13:41:23 GMT]]></title><description><![CDATA[<p>im Grunde genommen, meldet sich der Interpreter bei einer nicht-abgefangenen Exception mit einer deutlichen Fehlerbeschreibung</p>
<p>weil, wenn man alle exceptions abfangen würde, dann wäre praktisch der gesamte code in try blöcken, welchen ein except folgt</p>
<p>Also wie macht ihr es, bzw wie soll man es am besten machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140395</guid><dc:creator><![CDATA[pythonist]]></dc:creator><pubDate>Tue, 19 Sep 2006 13:41:23 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Tue, 19 Sep 2006 13:53:48 GMT]]></title><description><![CDATA[<p>Du kannst einfach einen einzigen Try-Block um dein gesamtes Programm legen:</p>
<pre><code>if __name__ == &quot;__main__&quot;:
  try:
    blah_blubb()
  except(Exception):
    pass # exceptions werden ignoriert..
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1140411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140411</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 19 Sep 2006 13:53:48 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Tue, 19 Sep 2006 16:08:30 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=1819" rel="nofollow">rüdiger</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=47" rel="nofollow">Themen rund um den PC</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=8" rel="nofollow">Rund um die Programmierung</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140538</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140538</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 19 Sep 2006 16:08:30 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Wed, 20 Sep 2006 14:43:48 GMT]]></title><description><![CDATA[<p>Doktor Prokt schrieb:</p>
<blockquote>
<p>Du kannst einfach einen einzigen Try-Block um dein gesamtes Programm legen:</p>
<pre><code>if __name__ == &quot;__main__&quot;:
  try:
    blah_blubb()
  except(Exception):
    pass # exceptions werden ignoriert..
</code></pre>
</blockquote>
<p>ich wollte aber nicht alle Exceptions ignorieren, da dies meiner Ansicht nach das so ziemlich schwachsinnigste ist, was man machen kann.</p>
<p>Schließlichj sin die fehlermeldungen sehr aufschlussreich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1141235</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1141235</guid><dc:creator><![CDATA[pythonist]]></dc:creator><pubDate>Wed, 20 Sep 2006 14:43:48 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Wed, 20 Sep 2006 15:20:43 GMT]]></title><description><![CDATA[<p>Dann machst statt dem pass eben ein print <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1141275</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1141275</guid><dc:creator><![CDATA[Blue-Tiger]]></dc:creator><pubDate>Wed, 20 Sep 2006 15:20:43 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Wed, 20 Sep 2006 16:30:28 GMT]]></title><description><![CDATA[<p>pythonist schrieb:</p>
<blockquote>
<p>Doktor Prokt schrieb:</p>
<blockquote>
<p>Du kannst einfach einen einzigen Try-Block um dein gesamtes Programm legen:</p>
<pre><code>if __name__ == &quot;__main__&quot;:
  try:
    blah_blubb()
  except(Exception):
    pass # exceptions werden ignoriert..
</code></pre>
</blockquote>
<p>ich wollte aber nicht alle Exceptions ignorieren, da dies meiner Ansicht nach das so ziemlich schwachsinnigste ist, was man machen kann.</p>
<p>Schließlichj sin die fehlermeldungen sehr aufschlussreich.</p>
</blockquote>
<p>Wie durch BlueTiger schon angedeutet, habe ich dir so viel Abstraktionsvermoegen zugetraut, 'pass' entsprechend deinen Wuenschen durch anderen Code zu ersetzen.</p>
<pre><code>try:
  qux()
except Exception,e:
  print str(e)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1141335</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1141335</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 20 Sep 2006 16:30:28 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Thu, 21 Sep 2006 17:52:16 GMT]]></title><description><![CDATA[<p>Doktor Prokt schrieb:</p>
<blockquote>
<p>pythonist schrieb:</p>
<blockquote>
<p>Doktor Prokt schrieb:</p>
<blockquote>
<p>Du kannst einfach einen einzigen Try-Block um dein gesamtes Programm legen:</p>
<pre><code>if __name__ == &quot;__main__&quot;:
  try:
    blah_blubb()
  except(Exception):
    pass # exceptions werden ignoriert..
</code></pre>
</blockquote>
<p>ich wollte aber nicht alle Exceptions ignorieren, da dies meiner Ansicht nach das so ziemlich schwachsinnigste ist, was man machen kann.</p>
<p>Schließlichj sin die fehlermeldungen sehr aufschlussreich.</p>
</blockquote>
<p>Wie durch BlueTiger schon angedeutet, habe ich dir so viel Abstraktionsvermoegen zugetraut, 'pass' entsprechend deinen Wuenschen durch anderen Code zu ersetzen.</p>
<pre><code>try:
  qux()
except Exception,e:
  print str(e)
</code></pre>
</blockquote>
<p>Schön und gut aber ich kapiere den sinn nicht...</p>
<p>Ich fange die exception ab, damit ich die fehlermeldung selber nochmal ausgeben darf? Sinn? *confused*</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142071</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142071</guid><dc:creator><![CDATA[pythonist]]></dc:creator><pubDate>Thu, 21 Sep 2006 17:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Thu, 21 Sep 2006 17:59:59 GMT]]></title><description><![CDATA[<p>Naja, dann lass das eben ganz mit dem Abfangen.<br />
Du musst schon wissen, was du willst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142075</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142075</guid><dc:creator><![CDATA[Nanyuki]]></dc:creator><pubDate>Thu, 21 Sep 2006 17:59:59 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Fri, 22 Sep 2006 12:42:34 GMT]]></title><description><![CDATA[<p>Nanyuki schrieb:</p>
<blockquote>
<p>Naja, dann lass das eben ganz mit dem Abfangen.<br />
Du musst schon wissen, was du willst.</p>
</blockquote>
<p>Ich wollte nur wissen ob man die Exceptions im <strong>nomalfall</strong> abfängt oder zulässt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142525</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142525</guid><dc:creator><![CDATA[pythonist]]></dc:creator><pubDate>Fri, 22 Sep 2006 12:42:34 GMT</pubDate></item><item><title><![CDATA[Reply to Pythonfrage ( alle exceptions abfangen???) on Fri, 22 Sep 2006 13:09:39 GMT]]></title><description><![CDATA[<p>pythonist schrieb:</p>
<blockquote>
<p>Nanyuki schrieb:</p>
<blockquote>
<p>Naja, dann lass das eben ganz mit dem Abfangen.<br />
Du musst schon wissen, was du willst.</p>
</blockquote>
<p>Ich wollte nur wissen ob man die Exceptions im <strong>nomalfall</strong> abfängt oder zulässt.</p>
</blockquote>
<p>Grundsaetzlich willst du natuerlich versuchen, alle Exceptions aufzufangen und angemessen zu reagieren, denn unaufgefangene Exceptions beenden das gerade laufende Programm, was zB im Falle einer IOError eher unnoetig ist.</p>
<p>Eine Exception wird moeglichst nah an der Stelle, an der sie auftreten kann, aufgefangen, sodass Code hoeherer Programmebenen nicht mit Implementierungsdetails niedrigerer Ebenen vermischt wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142546</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142546</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 22 Sep 2006 13:09:39 GMT</pubDate></item></channel></rss>