0

If an Exception occurs in an AsyncTask and is not caught, will it crash the whole app? If it will not crash the app, why is that?

Is there any difference between an uncaught exception in the doInBackground() method and other methods such as onPostExecute(), onPreExecute(), etc?

joao2fast4u
  • 6,868
  • 5
  • 28
  • 42
Chin
  • 19,717
  • 37
  • 107
  • 164

1 Answers1

1

There is a way for handling uncaught Exceptions in your application.

See here.

If you are not handling your Exception, it will crash your app, as expected, wherever the Exception is being thrown.

Community
  • 1
  • 1
joao2fast4u
  • 6,868
  • 5
  • 28
  • 42