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
  • 372
  • 1
  • 4
  • 17
trixo
  • 544
  • 4
  • 14

1 Answers1

0

Answer from @Joop Eggen in the comments is correct

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

trixo
  • 544
  • 4
  • 14