Java Stacktrace Print printStackTrace()

Here you can find the source of printStackTrace()

Description

print Stack Trace

License

Apache License

Declaration

public static void printStackTrace() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static void printStackTrace() {
        try {// w ww.ja  va 2 s . com
            throw new Exception();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void printStackTrace(String msg) {
        try {
            throw new Exception(msg);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Related

  1. printStackTrace()
  2. printStackTrace()
  3. printStackTrace()
  4. printStackTrace()
  5. printStackTrace()
  6. printStackTrace()
  7. printStackTrace()
  8. printStackTrace()
  9. printStackTrace(Exception e)