posted 14 years ago
No, it's not required. It's mostly for your own benefit while developing. However it's not a bad practice in general, especially when you catch an unexplained error. E.g. if I catch a RemoteException, I can't really give a good explanation to the user other than "There's a problem with the network connection" and maybe show e.toString(). I don't want to show the user a stack trace; that will just scare them. But I would like the stack trace to be stored somewhere, to facilitate debugging later, and logging the exception to a file is a good way to do this. Or you could jsut print to console, that's probably OK. Non-techie users won't be looking at the console anyway, just the GUI, and console output can be redirected elsewhere easily enough.