What to do when an exception occurs that affects functioniong of program

When an exception occurs that will affect the entire functioning of a program, in other words, the program will not be able to do what it is intended to do, is it best just print the exception to user and run System.exit(1)? And then force the user to run the program again.

Re: What to do when an exception occurs that affects functioniong of program

Depends what you mean by "the program will not be able to do what it is intended to do".

For example, a simple GUI with a file selector designed for uploading a file to somewhere.
If the file is not uploaded (eg a the connection doesn't work), that would count as "unable to do its work", in my book. But would you really want to force the user out of the app?