Further unit tests: getVar()
[cfb.git] / prod / net / jaekl / cfb / store / DbStore.java
index b17a419626a69e4afbb692aaf01157df9fe3c3da..917dc48d55e41857fd2096620b7ddacf5b9f3bcd 100644 (file)
@@ -223,7 +223,7 @@ public class DbStore {
                return getVarId(vars.get(0));
        }
        
-       LocalVariable getVar(Long varId) throws SQLException, TypeMismatchException
+       LocalVariable getVar(Long varId) throws SQLException, TypeMismatchException, StoreException
        {
                if (null == varId) {
                        return null;
@@ -235,7 +235,7 @@ public class DbStore {
                
                List<Row> result = m_driver.select(m_con, columns, tables, conditions);
                if (result.size() < 1) {
-                       throw new SQLException("No variable found for ID " + varId);
+                       throw new StoreException(StoreException.Type.INVALID_VAR_ID, ""+varId);
                }
                if (result.size() > 1) {
                        throw new SQLException("Too many matches (" + result.size() + ") found for variable ID " + varId);