Use logger to print the stack traces

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Explain why we are calling Runnable.run directly

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Improve the error handling and create exceptions object in one line instead of 3.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Dump the stack trace in a debug message.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Use getCause() instead of getTargetException(). Both methods are equivalent, but getCause uses a newest API.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Set the exception cause.

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Fix javadoc style

Add missing .
Add a couple of javadoc

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>