Here you can find the source of printError(Object obj, String message)
Parameter | Description |
---|---|
obj | For including a place where an error occurred |
message | An error message |
public static void printError(Object obj, String message)
//package com.java2s; //License from project: Apache License public class Main { /**//www . j ava 2 s. com * Utility for print an error message * @param obj For including a place where an error occurred * @param message An error message */ public static void printError(Object obj, String message) { System.err.println(obj.getClass().getName() + ": " + message); } /** * Utility for print an error message with a debugging clue * @param obj For including a place where an error occurred * @param message An error message * @param value A debugging clue */ public static void printError(Object obj, String message, String value) { if (150 < value.length()) { value = value.substring(0, 150); } System.err.println(obj.getClass().getName() + ": " + message + ", value is \"" + value + "\""); } }