Re: catch all program errors...




"tiewknvc9" <aotemp@xxxxxxxxxxx> wrote in message news:1149109073.605023.270490@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Yet I want to be sure that the user does not continue to use a program
that is not reacting correctly, one minor error can cause the program
to react poorly in time. So I think that the way I am going to go is
to make every single one of my functions throw an Exception. This way
I can react to the problem in a case by case basis.

I don't know what you mean by "react poorly in time" (cause the program to slow down?), but this is probably a very bad idea. If your get runtime exceptions thrown from within your code, it means there's a bug in your code. Adding more code won't solve the problem. The solution is to fix the bug itself.

You might want to read http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html

- Oliver

.