Ask Questions?

View Latest Questions

Advertisement


 
 

Error processing
Posted on: July 27, 2006 at 12:00 AM
I recently used a program that produced "Error in processing" as the error message.

Java: Error processing

Error in user input or action

If the user makes an error in input, give the appropriate feedback, and allow them to correct the error if possible. It's very important to give specific feedback that allows them to correct their problem.

I recently used a program that produced "Error in processing" as the error message. There was no hint as to whether is was my error or a bug in the program. Grrrrr.

Internal errors - assert

Use assert statements liberally to debug your own code. See Assertions. Assertions are very easy to use and are very helpful during testing, but have the disadvantage of being turned off by default during execution. Try to run with them turned on if possible.

Programmer errors - throw an exception

If you are writing code that is going to be used by others, it is especially important to detect programmer errors and throw an exception. Exceptions - More, altho quite incomplete, has an example using IllegalArgumentException that might be useful.

Copyleft 2005 Fred Swartz MIT License
Advertisement


DMCA.com