Java Error Print printError(String message, Exception e, boolean pst)

Here you can find the source of printError(String message, Exception e, boolean pst)

Description

print Error

License

Open Source License

Declaration

public static void printError(String message, Exception e, boolean pst) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean ERROR_ENABLED = true;

    public static void printError(String message, Exception e, boolean pst) {
        if (ERROR_ENABLED) {
            if (e != null && e.getMessage() != null) {
                message = message + " : " + e.getMessage();
            }//w  w  w . j  a  v  a  2s .c o  m
            System.err.println("[ERROR] " + message);
            if (e != null && pst) {
                e.printStackTrace(System.err);
            }
        }
    }
}

Related

  1. printError(Class c, String m, Exception e)
  2. printError(Object obj, String message)
  3. printError(String error)
  4. printError(String message)
  5. printError(String msg)
  6. printError(String msg, Exception exception, boolean quit)
  7. printError(String s)
  8. printError(String s)