bhadorn a écrit :
I'm aware that throwing exceptions is not supported by Zeus-Framework,
if you mean that.
Do you mean you are exception neutral or that you simply ignore the
exceptions part ?
There are very good reasons not using exceptions
with C++.
I known of some reasons but I am curious about what you call VERY GOOD
reasons.
Since C++ has no GC, it might cause resource leaks and
unexpected program states witch is really ugly.
It has no relation with GC, it is about exception awareness. But it is
true that it is easier in Java to code without exception awareness and
have no memory leak. Which doesn't mean the program has a correct behavior.
Zeus supports interfaces, software modules written in different
program languages (so, dll). Exceptions are a problem here. For
complex application, I prefer using return values.
There are good practice about exception just as with return value. It is
far easier to ignore them with return value though.
Using return values also means you have to increase the complexity of
the code in order to verify every return value which often obfuscate the
execution path.
To the contrary, I would expect return value to be more suitable for
simple parts while exception should be used as the complexity increases.
PS: By the way, I think those problems were known to other development
teams as well. Thats why COM uses return values and not exceptions.
I don't know COM development well but AFAIK COM doesn't let exception
escape and use them internally which is a good practice from my point of
view and not an inherently flaw of exception.
Narrowing the range of exception that cross boundaries means the user as
less to catch.
Michael