lqxue

          常用鏈接

          統(tǒng)計

          book

          tools

          最新評論

          Print the Stack Trace of the Exception to a String

          import java.io.PrintWriter;
          import java.io.StringWriter;
          public static String getStackTrace(Throwable t)
          {
          StringWriter sw = new StringWriter();
          PrintWriter pw = new PrintWriter(sw, true);
          t.printStackTrace(pw);
          pw.flush();
          sw.flush();
          return sw.toString();
          }

          posted on 2007-04-17 17:24 lqx 閱讀(219) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發(fā)表評論。


          網站導航:
           
          主站蜘蛛池模板: 孟村| 铅山县| 山西省| 平武县| 邻水| 政和县| 民和| 大邑县| 宁河县| 连云港市| 独山县| 丰台区| 互助| 清水县| 揭东县| 鱼台县| 平顶山市| 海盐县| 河津市| 礼泉县| 贵定县| 珠海市| 正镶白旗| 沾益县| 婺源县| 左云县| 宝丰县| 霍林郭勒市| 白城市| 岳阳县| 彩票| 巢湖市| 汽车| 磴口县| 临桂县| 苍溪县| 茶陵县| 英山县| 枣阳市| 田东县| 长岛县|