0

I have an Android app for which I would like to save an unhandled exception into the Sqlite DB. I have created all the functionality for saving Error messages into the DB.

My question is, how do I throw unhandled exception?

When I try to do throw new Exception("Save me intodb"), this doesn't work, because I am forced to surround it with try catch.

Any idea how can I actually kill my Android app?

Dokksen
  • 320
  • 4
  • 16
trixo
  • 323
  • 2
  • 12

1 Answers1

0

Answer from @Joop Eggen in the comments is correct

"Runtime exceptions should do; throw new IllegalStateException();"

trixo
  • 323
  • 2
  • 12