methods of I_ and X_ classes now throw RuntimeException instead of Exception.

This commit is contained in:
trifonnt 2008-10-25 19:10:07 +00:00
parent 909caca701
commit 7f47181120
2 changed files with 3 additions and 3 deletions

View File

@ -479,7 +479,7 @@ public class ModelClassGenerator
}
//end [ 1785001 ]
sb.append(NL)
.append("\tpublic "+referenceClassName+" get").append(tableName).append("() throws Exception ").append(NL)
.append("\tpublic "+referenceClassName+" get").append(tableName).append("() throws RuntimeException ").append(NL)
.append(" {").append(NL)
// TODO - here we can implement Lazy loading or Cache of class
.append(" Class<?> clazz = MTable.getClass("+referenceClassName+".Table_Name);").append(NL)
@ -496,7 +496,7 @@ public class ModelClassGenerator
.append(" } catch (Exception e) {").append(NL)
.append(" log.log(Level.SEVERE, \"(id) - Table=\" + Table_Name + \",Class=\" + clazz, e);").append(NL)
.append(" log.saveError(\"Error\", \"Table=\" + Table_Name + \",Class=\" + clazz);").append(NL)
.append(" throw e;").append(NL)
.append(" throw new RuntimeException( e );").append(NL)
.append(" }").append(NL)
.append(" return result;").append(NL)
.append(" }").append(NL)

View File

@ -410,7 +410,7 @@ public class ModelInterfaceGenerator {
//end [ 1785001 ]
sb.append("\n")
.append("\tpublic "+referenceClassName+" get").append(tableName).append("() throws Exception;")
.append("\tpublic "+referenceClassName+" get").append(tableName).append("() throws RuntimeException;")
;
} else {
// TODO - Handle other types