added more helpful error trace

This commit is contained in:
Tony Tam 2015-03-16 20:53:34 -07:00
parent 470ba201d8
commit fd792ef180

View File

@ -399,7 +399,14 @@ public class DefaultCodegen {
LOGGER.warn("null property for " + key);
}
else {
CodegenProperty cp = fromProperty(key, prop);
CodegenProperty cp;
try{
cp = fromProperty(key, prop);
}
catch(Exception e) {
System.out.println("failed to process model " + name);
throw new RuntimeException(e);
}
cp.required = false;
if(impl.getRequired() != null) {
for(String req : impl.getRequired()) {