try/catch异常捕捉

    StringWriter sw = new StringWriter();
    e.printStackTrace(new PrintWriter(sw));
    System.out.println(sw.getBuffer().toString());

 

posted @ 2015-08-19 13:54  星辰之力  阅读(185)  评论(0编辑  收藏  举报