Subject: Developers of Sympa
List archive
- From: Guillaume Rousse <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-developpers] Using exception
- Date: Mon, 07 Oct 2013 20:15:19 +0200
Le 07/10/2013 17:55, Guillaume Rousse a écrit :
Hence my point: to be discussed later, once we have a working code base,Here is an alternative proposal, a little more positive regarding current topic.
on specific use case.
1) select a simple ternal function (for instance Sympa::Tools::File::set_file_rights())
2) replace its current error handling logic with exceptions
3) find every place in Sympa code where this function is called
4) replace every usage of the function to ensure the exception won't propagate further, and the error is properly logged
5) add unit tests checking your modifications
6) iterate
This way, you're setting up your error handling bottom-up, rather than top-down. And if ever you have to refactor it, as you missed something, you have unit tests to check regressions.
--
Guillaume Rousse
INRIA, Direction des systèmes d'information
Domaine de Voluceau
Rocquencourt - BP 105
78153 Le Chesnay
Tel: 01 39 63 58 31
Attachment:
smime.p7s
Description: Signature cryptographique S/MIME
-
Re: [sympa-developpers] Merge is over, what now?,
David Verdin, 10/01/2013
-
Re: [sympa-developpers] Merge is over, what now?,
IKEDA Soji, 10/02/2013
- Re: [sympa-developpers] Merge is over, what now?, Guillaume Rousse, 10/03/2013
- <Possible follow-up(s)>
-
Re: [sympa-developpers] Merge is over, what now?,
IKEDA Soji, 10/02/2013
-
Re: [sympa-developpers] Merge is over, what now?,
David Verdin, 10/02/2013
-
Re: [sympa-developpers] Merge is over, what now?,
IKEDA Soji, 10/03/2013
-
Re: [sympa-developpers] Merge is over, what now?,
Guillaume Rousse, 10/03/2013
-
[sympa-developpers] Using exception,
IKEDA Soji, 10/04/2013
-
Re: [sympa-developpers] Using exception,
Guillaume Rousse, 10/07/2013
- Re: [sympa-developpers] Using exception, Guillaume Rousse, 10/07/2013
- Re: [sympa-developpers] Using exception, IKEDA Soji, 10/21/2013
- Re: [sympa-developpers] Using exception, Guillaume Rousse, 10/21/2013
-
Re: [sympa-developpers] Using exception,
Guillaume Rousse, 10/07/2013
-
[sympa-developpers] Using exception,
IKEDA Soji, 10/04/2013
-
Message not available
- Re: [sympa-developpers] Using exception, IKEDA Soji, 10/14/2013
- Re: [sympa-developpers] Using exception, IKEDA Soji, 10/16/2013
-
Re: [sympa-developpers] Merge is over, what now?,
Guillaume Rousse, 10/03/2013
-
Re: [sympa-developpers] Merge is over, what now?,
IKEDA Soji, 10/03/2013
-
Re: [sympa-developpers] Merge is over, what now?,
David Verdin, 10/02/2013
-
Re: [sympa-developpers] Merge is over, what now?,
IKEDA Soji, 10/02/2013
-
[sympa-developpers] coding style,
Guillaume Rousse, 10/03/2013
- Re: [sympa-developpers] coding style, Guillaume Rousse, 10/07/2013
Archive powered by MHonArc 2.6.19+.