lqxue

          常用鏈接

          統計

          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 閱讀(220) 評論(0)  編輯  收藏


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


          網站導航:
           
          主站蜘蛛池模板: 江达县| 德安县| 托克托县| 纳雍县| 宜川县| 廉江市| 称多县| 绍兴市| 米泉市| 新丰县| 正蓝旗| 饶河县| 广丰县| 那曲县| 甘孜| 高雄县| 彭水| 潼南县| 称多县| 临泽县| 凉山| 永善县| 元阳县| 绵竹市| 汝城县| 监利县| 镇江市| 定西市| 星子县| 阜阳市| 潼关县| 寿光市| 敦煌市| 舒城县| 成都市| 多伦县| 昌邑市| 嘉黎县| 合作市| 中阳县| 祁门县|