|
![](/i/fill.gif) |
In article <402125e4@news.povray.org>, dan### [at] yahoo com says...
> try
> {
> Do something
> }
> catch (Exception ex)
> {
> Failure
> }
>
> Are you saying all these people are wrong?
Just my two cents here, but this isn't exactly the same things.
However... If you opened the file, then tested to see if it worked and
intentionally throw an exception, then it would be the same. What you are
doing is manually handling an event that languages like Java can
sometimes automatically generate an error event for. When this is the
case, it is a real good idea to make sure things happen in the correct
order. There are quite a few cases where checking after the fact can be
flat out lethal to your program. In fact when dealing with Windows, the
damn API is so flaky that it may actually appear to work and only crash
your program, and the OS, *after* you try to shut down the program.
Believe me, I have had it happen. lol
--
void main () {
call functional_code()
else
call crash_windows();
}
Post a reply to this message
|
![](/i/fill.gif) |