diff options
Diffstat (limited to 'libraries/spongycastle/core/src/main/jdk1.1/org/spongycastle/i18n/MissingEntryException.java')
-rw-r--r-- | libraries/spongycastle/core/src/main/jdk1.1/org/spongycastle/i18n/MissingEntryException.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/libraries/spongycastle/core/src/main/jdk1.1/org/spongycastle/i18n/MissingEntryException.java b/libraries/spongycastle/core/src/main/jdk1.1/org/spongycastle/i18n/MissingEntryException.java new file mode 100644 index 000000000..d876a91af --- /dev/null +++ b/libraries/spongycastle/core/src/main/jdk1.1/org/spongycastle/i18n/MissingEntryException.java @@ -0,0 +1,63 @@ +package org.spongycastle.i18n; + +import java.net.URL; +import java.util.Locale; + +public class MissingEntryException extends RuntimeException +{ + + protected final String resource; + protected final String key; + protected final ClassLoader loader; + protected final Locale locale; + + private String debugMsg; + + public MissingEntryException(String message, String resource, String key, Locale locale, ClassLoader loader) + { + super(message); + this.resource = resource; + this.key = key; + this.locale = locale; + this.loader = loader; + } + + public MissingEntryException(String message, Throwable cause, String resource, String key, Locale locale, ClassLoader loader) + { + super(message + ": " + cause); + this.resource = resource; + this.key = key; + this.locale = locale; + this.loader = loader; + } + + public String getKey() + { + return key; + } + + public String getResource() + { + return resource; + } + + public ClassLoader getClassLoader() + { + return loader; + } + + public Locale getLocale() + { + return locale; + } + + public String getDebugMsg() + { + if (debugMsg == null) + { + debugMsg = "Can not find entry " + key + " in resource file " + resource + " for the locale " + locale + "."; + } + return debugMsg; + } + +} |