I have a `JavaExec` task I use to run a swing app...
# community-support
r
I have a
JavaExec
task I use to run a swing app in dev for testing. Sometimes (well, usually) when I shutdown the app by cancelling it in Idea it gradle complains that the task was cancelled. Is there a way to avoid that? I shutdown with this method deliberately to avoid some state that the app saves on shutdown
v
Well, what should I say. If you don't want it to be cancelled, don't cancel it. 🤷‍♂️
r
I'm fine with it being cancelled, it's the interrupted exception that I would like to prevent. Sometimes when I cancel it there will be no exception, but it's pretty rare. Overall, it's just a minor annoyance
v
Still not sure what you mean. If you cancel execution it is like pressing Ctrl+C on commandline. This does not result in an orderly shutdown, but an exceptional ending. And that is reported by Gradle.
r
oh well, thanks anyway ¯\_(ツ)_/¯