b*g 发帖数: 644 | 1 5. Writing blank exception handlers
I know it's very tempting to write blank exception handlers, and to just
ignore errors. But if you run into problems, and haven't written any
error messages, it becomes almost impossible to find out the cause of
the error. Even the simplest exception handler can be of benefit. For
example, put a try { .. } catch Exception around your code, to catch ANY
type of exception, and print out the message. You don't need to write a
custom handler for every exception (t |
|