AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

try .. except .. finally

Ein Thema von Surrounder · begonnen am 14. Jul 2009 · letzter Beitrag vom 16. Jul 2009
Antwort Antwort
Seite 4 von 4   « Erste     234   
alzaimar
(Moderator)

Registriert seit: 6. Mai 2005
Ort: Berlin
4.956 Beiträge
 
Delphi 2007 Enterprise
 
#31

Re: try .. except .. finally

  Alt 16. Jul 2009, 07:02
Die Methode AddLogAlert hat natürlich einen eigenen Exception-Handler, der etwaige Probleme abfängt. Was interessiert den Programmierer, ob die Platte korrupt ist? Das muss die IO-Schicht abfangen und ggf. eine fatale Exception werfen, oder im Hintergrund eine neue Festplatte downloaden und sofort installieren.

Hier ist uns Java überlegen, wo man in der Methodendeklaration gleich noch angibt, welche Exceptions auftreten können.
"Wenn ist das Nunstruck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput!"
(Monty Python "Joke Warefare")
  Mit Zitat antworten Zitat
Benutzerbild von Khabarakh
Khabarakh

Registriert seit: 18. Aug 2004
Ort: Brackenheim VS08 Pro
2.876 Beiträge
 
#32

Re: try .. except .. finally

  Alt 16. Jul 2009, 08:24
Zitat von alzaimar:
Hier ist uns Java überlegen, wo man in der Methodendeklaration gleich noch angibt, welche Exceptions auftreten können.
Segen... oder Fluch ?

The Trouble with Checked Exceptions. A Conversation with Anders Hejlsberg

Dort wird auch genannt, warum ich keine große Notwendigkeit für try-except-finally sehe:
Zitat:
It is funny how people think that the important thing about exceptions is handling them. That is not the important thing about exceptions. In a well-written application there's a ratio of ten to one, in my opinion, of try finally to try catch.
Gut, C# besitzt sowas , aber dort habe ich sowieso noch nie ein finally benötigt ² .
Sebastian
Moderator in der EE
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 4 von 4   « Erste     234   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:11 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz