diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-02-13 16:53:22 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-02-13 16:53:22 +0000 |
commit | 3d872dc4a5f91ca9c1041526358ceb4aaa31d39c (patch) | |
tree | ceaeb797f86d3a2f7a4e0b4aaa28fe109f02488c /java/com/xagasoft/gats/KeyNotFoundException.java | |
parent | 06f34a151f59343809154268da272022994fef45 (diff) | |
download | libgats-3d872dc4a5f91ca9c1041526358ceb4aaa31d39c.tar.gz libgats-3d872dc4a5f91ca9c1041526358ceb4aaa31d39c.tar.bz2 libgats-3d872dc4a5f91ca9c1041526358ceb4aaa31d39c.tar.xz libgats-3d872dc4a5f91ca9c1041526358ceb4aaa31d39c.zip |
Trying a more sensible handling for get helpers in GatsDictionary, they throw
an exception now if the key isn't found. getInt and getFloat will both probably
be complimented by getBigInt and getBigFloat or something like it later on,
but we'll always return types from those helpers that can't contain a null,
so exceptions it is.
Diffstat (limited to 'java/com/xagasoft/gats/KeyNotFoundException.java')
-rw-r--r-- | java/com/xagasoft/gats/KeyNotFoundException.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/java/com/xagasoft/gats/KeyNotFoundException.java b/java/com/xagasoft/gats/KeyNotFoundException.java new file mode 100644 index 0000000..d46fc47 --- /dev/null +++ b/java/com/xagasoft/gats/KeyNotFoundException.java | |||
@@ -0,0 +1,23 @@ | |||
1 | package com.xagasoft.gats; | ||
2 | |||
3 | public class KeyNotFoundException extends Exception | ||
4 | { | ||
5 | private Object oSrc = null; | ||
6 | private String sKey = null; | ||
7 | |||
8 | public KeyNotFoundException( Object oSrc, String sKey ) | ||
9 | { | ||
10 | this.oSrc = oSrc; | ||
11 | this.sKey = sKey; | ||
12 | } | ||
13 | |||
14 | public Object getSource() | ||
15 | { | ||
16 | return oSrc; | ||
17 | } | ||
18 | |||
19 | public String getKey() | ||
20 | { | ||
21 | return sKey; | ||
22 | } | ||
23 | } | ||