SSISO Community

시소당

public static void error(Exception e)

public  static  void  error(Exception  e)  {
        System.out.println("[ERROR]  Exception:  "  +  e.getClass().getName());
        System.out.println("[ERROR]  Exception  Message:  "  +  e.getMessage());
        
        String  stackTrace  =  "";
        StackTraceElement[]  ste  =  e.getStackTrace();
        for  (int  i  =  0;  i  <  ste.length;  i++)  {
                stackTrace  =  ste[i].toString()  +  "\n";
        }
        System.out.println("[ERROR]  Stack  Trace:  "  +  stackTrace);
}

//에러출력  만들어  놓구  메소드  호출하면  됨...  일반출력보다  자세히  보기위해  사용

1669 view

4.0 stars