[Rock-dev] On ignoring exceptions ...
Sylvain Joyeux
sylvain.joyeux at dfki.de
Tue Sep 17 11:43:43 CEST 2013
This is a general programming issue
Catching an exception to ignore it is NOT something that should be done
lightly. It is a very important act which is hidden behind the fact that
it takes only (around) two lines of code to do. Why is it so important:
because ignoring errors, when not done at the right place, can lead to
'silent' problems that hit a lot later. Week-long debugging sessions,
here we are !
This is actually why I strongly prefer exceptions over all other forms
of error representation and handling: because they cannot be ignored _by
default_. One has to catch them explicitly.
A fact of the programmer's life is that it sometimes makes sense. Fair
enough. Now, because it is such an important act (am I stressing that
enough ?), please HEAVILY describe the rationale of this act in the
commit that pushes it to the mainline code. Don't be shy. If you don't
have enough arguments, it is probably that you should not ignore the
error in the first place.
Thank you in advance for reducing the length of everyone's debugging
sessions
--
Sylvain Joyeux (Dr.Ing.)
Space & Security Robotics
!!! Achtung, neue Telefonnummer!!!
Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0)421 178-454136
Fax: +49 (0)421 218-454150
E-Mail: robotik at dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
More information about the Rock-dev
mailing list