You can see what the method does here
http://java.sun.com/javase/6/docs/ap...ml#getMessage() and many other methods. The Java doc is a very good resource. It is used as a way to see what goes wrong. For example the error message could be writen to an error log for debugging.