Returns the localized error message corresponding to the given error code. If the given error code is not defined in the resource bundle for localized error messages, it is used as the error message. @param errCode Error code to localize @return Localized error message
(String errCode)
| 54 | * @return Localized error message |
| 55 | */ |
| 56 | public static String getMessage(String errCode) { |
| 57 | String errMsg = errCode; |
| 58 | try { |
| 59 | if (bundle != null) { |
| 60 | errMsg = bundle.getString(errCode); |
| 61 | } |
| 62 | } catch (MissingResourceException e) { |
| 63 | // Ignore |
| 64 | } |
| 65 | return errMsg; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Returns the localized error message corresponding to the given error code. |