Many times I saw logging of errors like these:
System.out.println(\"Method aMethod with parameters a:\"+a+\" b: \"+b);
print(\"Error in line 88\");
>
Aside from technical considerations from other answers it is advisable to log a meaningful message and perhaps some steps to avoid the error in the future. Depending on the errors, of course.
You could get more out of a I/O-Error when the message states something like "Could not read from file X, you don't have the appropriate permission."
See more examples on SO or search the web.