X-Git-Url: http://jaekl.net/gitweb/?p=cfb.git;a=blobdiff_plain;f=prod%2Fnet%2Fjaekl%2Fcfb%2Fstore%2FStoreException.java;fp=prod%2Fnet%2Fjaekl%2Fcfb%2Fstore%2FStoreException.java;h=b7d75816450814da88747a968314aa76e3dd4162;hp=5c0caf43405f3af851fd70a1cfee21e38d27694a;hb=a1378c84c773511e4ffe99fb419da67af188aff7;hpb=a59aa887766f250ba0ad0948c54e1a8d9a590a23 diff --git a/prod/net/jaekl/cfb/store/StoreException.java b/prod/net/jaekl/cfb/store/StoreException.java index 5c0caf4..b7d7581 100644 --- a/prod/net/jaekl/cfb/store/StoreException.java +++ b/prod/net/jaekl/cfb/store/StoreException.java @@ -7,7 +7,8 @@ import net.jaekl.cfb.CfbException; public class StoreException extends CfbException { public enum Type { UNKNOWN_PATTERN, // bug pattern type is not found in the message collection - UNKNOWN_CATEGORY // bug category is not found in the message collection + UNKNOWN_CATEGORY, // bug category is not found in the message collection + INVALID_LOC_ID // the specified location ID is not found in the database } private Type m_type; @@ -22,6 +23,15 @@ public class StoreException extends CfbException { m_info = info; } + public StoreException(Throwable cause, Type type, String... info) { + super(cause); + + m_type = type; + m_info = info; + } + + public Type getType() { return m_type; } + @Override public String toString() { return "" + getClass().getName() + ": " + m_type + ": " + Arrays.toString(m_info);