/** * Get a parametrized formatted error message from the resource-bundle. The message consists of two parts. The first * part is the error numeric Id associated with the key used to identify the message in the resource file. For * instance, suppose the error key is MyClass.ERROR_0069_DONKEY_PUNCH. The first part of the error msg would be * "0069". The second part of the returned string is simply the <code>msg</code> parameter. * <p/> * Currently the format is: error key - error msg For instance: "0069 - You were punched by the donkey." * * @param key String containing the key that was used to obtain the <code>msg</code> parameter from the resource * file. * @param param1 the parameter for the message * @return String containing the formatted error message. */ public String getErrorString( final String key, final String... param1 ) { return formatErrorMessage( key, getString( key, param1 ) ); } }
/** * Get a parametrized formatted error message from the resource-bundle. The message consists of two parts. The first * part is the error numeric Id associated with the key used to identify the message in the resource file. For * instance, suppose the error key is MyClass.ERROR_0069_DONKEY_PUNCH. The first part of the error msg would be * "0069". The second part of the returned string is simply the <code>msg</code> parameter. * <p/> * Currently the format is: error key - error msg For instance: "0069 - You were punched by the donkey." * * @param key String containing the key that was used to obtain the <code>msg</code> parameter from the resource * file. * @param param1 the parameter for the message * @return String containing the formatted error message. */ public String getErrorString(final String key, final String... param1) { return formatErrorMessage(key, getString(key, param1)); } }