Java Error Print printError(String message)

Here you can find the source of printError(String message)

Description

Prints an error to the console with the prefix
ERROR

License

Open Source License

Parameter

Parameter Description
message The error message

Declaration

public static void printError(String message) 

Method Source Code

//package com.java2s;
/*/*from   ww  w.  jav  a2s  . com*/
 * Copyright (C) 2012 MineStar.de 
 * 
 * This file is part of MineStarLibrary.
 * 
 * MineStarLibrary is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 * 
 * MineStarLibrary is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with MineStarLibrary.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    /**
     * Prints an error to the console with the prefix <br>
     * <code>ERROR </code>
     * 
     * @param message
     *            The error message
     */
    public static void printError(String message) {
        printInfo("ERROR! " + message);
    }

    /**
     * Prints an error to the console with the prefix <br>
     * <code>[ PLUGIN ] : ERROR</code>
     * 
     * @param pluginName
     *            The name of the plugin
     * @param message
     *            The error message
     */
    public static void printError(String pluginName, String message) {
        printInfo(pluginName, "ERROR! " + message);
    }

    /**
     * Prints an information to the console
     * 
     * @param message
     *            The information
     */
    public static void printInfo(String message) {
        System.out.println(message);
    }

    /**
     * Prints an information to the console with the prefix <br>
     * <code>[ PLUGIN ] :</code>
     * 
     * @param pluginName
     *            The name of the plugin
     * @param message
     *            The information
     */
    public static void printInfo(String pluginName, String message) {
        printInfo("[ " + pluginName + " ] : " + message);
    }
}

Related

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