public void printException ( Throwable t ) { StringWriter stringWriter = new StringWriter ( ) ; PrintWriter printWriter = new PrintWriter ( stringWriter ) ; t . printStackTrace ( printWriter ) ; outputText ( ( TextView ) findViewById ( R . id . textView ) , String . format ( "Got an exception from running samples. Exception details:\n%s\n" , stringWriter . toString ( ) ) ) ; }
Prints out the exception information .