Java Error Print printErrorMessage(String errorMessage)

Here you can find the source of printErrorMessage(String errorMessage)

Description

Print the error message if it is not null and empty string.

License

Open Source License

Declaration

public static void printErrorMessage(String errorMessage) 

Method Source Code

//package com.java2s;
/**//from   w  w w  .  ja va  2 s  . c om
 * Copyright 2010 Yodlee, Inc.  All Rights Reserved.  Your use of this code 
 * requires a license from Yodlee.  Any such license to this code is 
 * restricted to evaluation/illustrative purposes only. It is not intended 
 * for use in a production environment, and Yodlee disclaims all warranties 
 * and/or support obligations concerning this code, regardless of the terms 
 * of any other agreements between Yodlee and you.
 */

public class Main {
    /**
     * Print the error message if it is not null and empty string.
     */
    public static void printErrorMessage(String errorMessage) {

        if (errorMessage != null && !errorMessage.trim().equals("")) {
            System.out.println("Error Message: " + errorMessage);
        }

    }
}

Related

  1. printErrorFooter(String content)
  2. printErrorInfo(Object e)
  3. printErrorLine()
  4. printErrorln(String string)
  5. printErrorMessage(final String prg_name, final String message)
  6. printErrorMsgTraceAsCause(Throwable throwable, StackTraceElement[] causedTrace)