Re: [Dev-C++] public/private data decision
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <or...@vp...> - 2004-04-12 23:01:05
|
Krzysztof Kapuscik wrote: > BTW. Throwing exceptions are sometimes not best way to inform that > something has not gone the right way. Sometimes (often?) it is better > to return bool (success/failure) or int (0=3Dsuccess, <>0 error code) > value. Yeah, I first used that, but this time I need exceptions, as there is=20 some inheritance involved, and not only one thing is saved, but several=20 Save's are called, and doing: if ( c1.Save() ) if ( c2.Save() ) if ( c3.Save() ) return true; else ... became too painful :) But for simple cases, returning bool would be absolutely fine! Thanks for your comments! -- Greetings, Bal=E1zs |