Question: Is there a way I can automatically print a stack trace when Exception occurs? I understand I can do so by manually surrounding a block with a try-catch statement, but there's no prior-knowledge where an exception would happen in a program, and doing it in suspicious region block by block would be super inefficient, since there're potentially many. So is there any configuration option or any programmatic way to do so in Android?(like surrounding a try-catch block in the highest level of method?, but what's the highest level of method)

Answer: 
Define a global exception handler in your `Application` class and add any code you need to it. 

```
Thread.setDefaultUncaughtExceptionHandler(
                new DefaultExceptionHandler(this));

```

It is recommended that you still re-throw caught exceptions so that the app stops running, because it will be in an unstable state and not doing so can cause the app to freeze up.
There are two major kinds of exceptions:

1. Exceptions caused by programming errors (e.g. dereferencing a null reference, ...)
2. Exceptions caused by the environment (e.g. user enters 'abc' in a numeric field, network cable was unplugged, ...)

In most of the cases you can't really recover from the first ones. (If something unexpectedly went wrong, how can you know what to do to recover safely?) This are usually unchecked exceptions and you don't have to catch them somewhere.

*Uncaught exceptions are catched by the system/framework and logged automatically!*

Take care for the second type of exceptions! They are mostly not unchecked and have to be either cached or specified via `throws` clause. Handle them, probably [log them](http://developer.android.com/tools/debugging/debugging-log.html), and try to recover if possible.

[This document](http://developer.android.com/tools/help/logcat.html) explains how you can read the error log and other logs on android devices. There are also apps available that can display the log on the device itself.

Also read this [basic exception tutorial](http://docs.oracle.com/javase/tutorial/essential/exceptions/)!