From 3d872dc4a5f91ca9c1041526358ceb4aaa31d39c Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 13 Feb 2012 16:53:22 +0000 Subject: 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. --- java/com/xagasoft/gats/KeyNotFoundException.java | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 java/com/xagasoft/gats/KeyNotFoundException.java (limited to 'java/com/xagasoft/gats/KeyNotFoundException.java') 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 @@ +package com.xagasoft.gats; + +public class KeyNotFoundException extends Exception +{ + private Object oSrc = null; + private String sKey = null; + + public KeyNotFoundException( Object oSrc, String sKey ) + { + this.oSrc = oSrc; + this.sKey = sKey; + } + + public Object getSource() + { + return oSrc; + } + + public String getKey() + { + return sKey; + } +} -- cgit v1.2.3