What's the best way to handle errors cause by incorrect command line parameters? I was displaying a usage note in the console and exiting the application. I changed it to display a dialog with an error message describing the problem. In this case, the application exits after the dialog is dismissed. The problem with this is that there is no frame. If the dialog gets behind another window the user may not know that it is there.
OK. What do you think about throwing an exception from main()? I'm considering throwing an IllegalArgumentException and not catching it in the main() method. A stack trace would appear in the console with the usage note. I wonder if this is not considered a good approach.
I don't think this is a big issue either way. Just trying to clean up some little things. Thanks.