Android - print full exception backtrace to log -
i have try/catch block throws exception , see information exception in android device log.
i read log of mobile device command development computer:
/home/dan/android-sdk-linux_x86/tools/adb shell logcat i tried first:
try { // code buggy code } catch (exception e) { e.printstacktrace(); } but doesn't print log. that's pity because have helped lot.
the best have achieved is:
try { // code buggy code } catch (exception e) { log.e("myapp", "exception: " + e.getmessage()); log.e("myapp", "exception: " + e.tostring()); } better nothing not satisfying.
do know how print full backtrace log?
thanks.
try { // code might throw exception } catch (exception e) { log.e("myapp", "exception", e); }
Comments
Post a Comment