I need to catch that exception but I can't figure out which one it is. The IDE i'm using right now doesn't allow for a program interrupt that way.
I know how to user try/catch, but I don't actually know what I'm trying to catch..
Can anyone help me with this?
I seem to recall that CTRL-C becomes an InterruptedException and this article seems to support that. As suggested in other answers the use of addShutdownHook is a good way to go, unless you want to prevent the shutdown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With