Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #6140

Re: need argument for try catch blocks

From Edek <edek.pienkowski@gmail.com>
Newsgroups comp.lang.c++
Subject Re: need argument for try catch blocks
Date 2011-06-03 16:04 +0200
Organization ATMAN - ATM S.A.
Message-ID <isaplv$la$1@node2.news.atman.pl> (permalink)
References (1 earlier) <iro3o6$t1o$1@node2.news.atman.pl> <iro4ma$f08$1@news.ett.com.ua> <cbfa59d5-af09-499d-acd3-6cafef0636ae@t16g2000vbi.googlegroups.com> <irol4c$emj$1@node2.news.atman.pl> <9998c68b-fd72-4d1d-890c-da6061352748@n10g2000vby.googlegroups.com>

Show all headers | View raw


>>> Anyway, the advice in the posts is good. You guys have changed my mind
>>> on exception handling. Maybe I will try to convice my team that we
>>> should take the time to come up with a design decision on when and how
>>> to handle exceptions, their types, identify these boundries, etc.
>>
>> If 60% of code is C (or C-style), I wouldn't be orthodox about RAII.
>> Either the developers do have ways to handle debugging and so on, maybe
>> just slightly home-made, or maybe some ways can be gradually introduced.
>
> If your code does throw exceptions (or calls modules that throw
> exceptions out) then it is not a C anymore and so you have to go
> orthodox about exception safety and RAII. Similarly if your code runs
> multiple threads then you have to go orthodox about thread safety.

Exception safety does not necessarily require RAII. It depends,
case-by-case. Sometimes, one can mix large parts of code which is
too expensive to 'convert' to RAII with wrapping code that RAIIfies it.

I agree that RAII, or close to RAII, would be a reasonable goal: what
I'm saying is that does not happen in a glimpse and you have to live
those couple of months/years plus bug fixing with non-RAII code.

Do you know a QuickRAIIFierTool download page? :-) I'm half-serious,
one should write code transformation tools such as this one.

>
> Attempts to ignore usage principles of tools used will result with
> disaster. If you doubt then better go work in saw-mill. Few fingers
> later you will learn to follow the principles of saw usage. ;)

I must learn to use this metaphor...

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: need argument for try catch blocks Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 14:05 +0200
  Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-27 14:16 +0200
    Re: need argument for try catch blocks Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 14:48 +0200
      Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-27 15:10 +0200
        Re: need argument for try catch blocks Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 15:54 +0200
          Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-27 16:13 +0200
        Re: need argument for try catch blocks "Fred Zwarts" <F.Zwarts@KVI.nl> - 2011-05-30 09:56 +0200
          Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-30 10:22 +0200
    Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-05-27 07:43 -0700
      Re: need argument for try catch blocks Paavo Helde <myfirstname@osa.pri.ee> - 2011-05-27 10:19 -0500
      Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-27 17:58 +0200
        Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-05-30 09:43 -0700
          Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-05-30 11:58 -0700
          Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-05-31 08:57 -0700
            Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-05-31 13:33 -0700
              Re: need argument for try catch blocks Ian Collins <ian-news@hotmail.com> - 2011-06-01 09:03 +1200
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-05-31 14:57 -0700
                Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-06-01 02:06 +0200
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-05-31 16:32 -0700
              Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-06-01 11:42 -0700
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-06-02 16:01 -0700
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-03 04:27 -0700
                Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-06-03 07:39 -0700
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-03 10:43 -0700
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-06-03 11:31 -0700
                Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-06-03 12:14 -0700
                Re: need argument for try catch blocks Leigh Johnston <leigh@i42.co.uk> - 2011-06-03 21:22 +0100
                Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-06-04 17:30 +0200
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-06-04 15:16 -0700
                Re: need argument for try catch blocks Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-11 10:22 +0000
                Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-03 21:17 +0200
                Re: need argument for try catch blocks Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-03 18:24 -0700
                Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-04 19:34 +0200
                Re: need argument for try catch blocks Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-04 19:39 -0700
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-06-04 07:22 -0700
                Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-04 19:24 +0200
                Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-06-03 07:51 -0700
                Re: need argument for try catch blocks "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-06-03 20:57 +0200
                Re: need argument for try catch blocks Dombo <dombo@disposable.invalid> - 2011-06-05 13:29 +0200
      Re: need argument for try catch blocks Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 19:01 +0200
        Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-05-31 17:13 -0700
          Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-03 16:04 +0200
            Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-03 09:44 -0700
              Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-03 19:04 +0200
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-04 07:05 -0700
    Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-06 05:15 -0500

csiph-web