2 ms·
catch (Exception e) { e.printStackTrace(); } This looks like an inadvisable move. Do android apps recover the data written to stderr anywhere
by wyldfire 8y ago
catch (Exception e)
{
e.printStackTrace();
}
This looks like an inadvisable move. Do android apps recover the data written to stderr anywhere or does this trace just go into the bit bucket? Why not let the unwind continue and if the application crashes, android can do its automagic bug reporting for you?
If Java requires you to catch the exception or declare a throw, then it seems like it should throw until you get to an outermost stack frame that's sane enough to handle it (open an error dialog box, retry, log the error, etc).
Sorry, the app and the idea are super cool, and keep up the good work. This is intended as constructive criticism.
- HillaryBriss 8y agoThat catch block is often generated automatically by android studio when you create a try block. Not addressing your comment about the general inadvisability of merely logging the error, one can, as an alternative to standard error printing, replace e.printStackTrace() with something like Log.e(TAG, "Caught and ignored an exception", e)