M
Milan Gornik
Hello guys,
I consulted both MSDN and Borland Builder's documentation to try to find
something about this, but I haven't found it. I saw that both VC++ and
Builder support different kinds of exception handling mechanisms. As I
understand, the standard way is to use exception handling through exception
classes and try/catch statements. Now, in Java, it is mandatory to supply
method prototype with info on which exceptions can occur. This seems to be
supported by Borland C++, and looks like a good way to have good, documented
code. Is it the part of ANSI C++ standard? Furthermore, I was in doubt what
to do if I have inherited class and want to override the parent's class
method. If I have method in base class which declares to throw some
exceptions, compiler would complain if exact set of exceptions were not
supplied by overriding method in derived class. I have situation in which I
would like to add some more possible exceptions in overridden method. Is it
possible, and should I really use this method of documenting possible
exceptions in methods?
Thanks in advance,
Milan Gornik
I consulted both MSDN and Borland Builder's documentation to try to find
something about this, but I haven't found it. I saw that both VC++ and
Builder support different kinds of exception handling mechanisms. As I
understand, the standard way is to use exception handling through exception
classes and try/catch statements. Now, in Java, it is mandatory to supply
method prototype with info on which exceptions can occur. This seems to be
supported by Borland C++, and looks like a good way to have good, documented
code. Is it the part of ANSI C++ standard? Furthermore, I was in doubt what
to do if I have inherited class and want to override the parent's class
method. If I have method in base class which declares to throw some
exceptions, compiler would complain if exact set of exceptions were not
supplied by overriding method in derived class. I have situation in which I
would like to add some more possible exceptions in overridden method. Is it
possible, and should I really use this method of documenting possible
exceptions in methods?
Thanks in advance,
Milan Gornik