private String getThrowableInfo(Throwable arg1)   
    {    
        Writer writer = new StringWriter();    
        PrintWriter pw = new PrintWriter(writer);    
        arg1.printStackTrace(pw);    
        pw.close();    
        String error= writer.toString();    
        return error;    
    }