|
From: Michael C <jd...@ho...> - 2001-09-05 21:49:18
|
As stated in the previous email, I agree. However, it would be interesting to see what happens if you make an object in the initialiser list consistantly fail on construction-initialisation. Then when the exception is caught in the catch block, construct the object again. A recursive construction-failure scenario as you suggest. If the compiler is clever enough it should report this as a warning. I guess it can not report this as an error as it doesn't stop you from programming recursive functions in general, and you could forget the base test in one of these and hang your program. I may try this out this weekend. When you say 'continue below the catch block' I guess this is a typo and you mean within the catch block. I don't think you can have another block under the catch block as this would be outside the scope of the constructor. Michael ----- Original Message ----- From: Ioannis Vranos <no...@ya...> To: Dev-C++ <dev...@li...> Sent: Wednesday, September 05, 2001 8:08 PM Subject: RE: [Dev-C++] C++ question > -----Original Message----- > From: Michael Codadeen [mailto:jd...@ho...] > Sent: Wednesday, September 05, 2001 5:50 PM > To: no...@ya... > Subject: RE: [Dev-C++] C++ question > > > The standard states at that the function body ends at the end > of the first > block. In effect it looks like a try block but isn't one. > > I think for this specification there isn't a try block. Do you agree ? > > Michael The try block is the function body and the opposite. The problem is, the catch block belongs to where. For instance can we recall the constructor again from the catch block or we can continue below the catch block (that is, it belongs to the constructor too). Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys _______________________________________________ Dev-cpp-users mailing list Dev...@li... https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |