Replace all instance of e.printStackTrace() by LOGGER.error("message", e);. This PR is in response to a comment by @TheBonheurs about the use of e.printStackTrace() in MainActivity.java.
Why
To improve the usage of the logging facilities and make it easier to debug. Even though e.printStackTrace() provides some info, LOGGER.error("message", e); provides more specific info and (can) also log to a file.
How
As you can see in commit 8282c1b PMD should now complain if e.printStackTrace() is used. If you still have your doubts you can use Ctrl + Shift + f (in Android studio) to search the whole project for "printStackTrace".
That question should have been raised before 😅 Anyhow, in most cases you can (one way or another) force the exception to show up... But that is not wat this PR is about imo
Relevant Issues: #38
Related Pull Requests: -
What
Replace all instance of
e.printStackTrace()
byLOGGER.error("message", e);
. This PR is in response to a comment by @TheBonheurs about the use ofe.printStackTrace()
inMainActivity.java
.Why
To improve the usage of the logging facilities and make it easier to debug. Even though
e.printStackTrace()
provides some info,LOGGER.error("message", e);
provides more specific info and (can) also log to a file.How
As you can see in commit 8282c1b PMD should now complain if
e.printStackTrace()
is used. If you still have your doubts you can use Ctrl + Shift + f (in Android studio) to search the whole project for "printStackTrace".Alternative implementation
Non.
Notes
n/a