mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
replaced raw exception types
This commit is contained in:
parent
cb2e617542
commit
3aeb109a4d
18
src/main/java/com/mysema/codegen/CodegenException.java
Normal file
18
src/main/java/com/mysema/codegen/CodegenException.java
Normal file
@ -0,0 +1,18 @@
|
||||
package com.mysema.codegen;
|
||||
|
||||
public class CodegenException extends RuntimeException{
|
||||
|
||||
private static final long serialVersionUID = -8704782349669898467L;
|
||||
|
||||
public CodegenException(String msg){
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public CodegenException(String msg, Throwable t){
|
||||
super(msg, t);
|
||||
}
|
||||
|
||||
public CodegenException(Throwable t){
|
||||
super(t);
|
||||
}
|
||||
}
|
||||
@ -81,7 +81,7 @@ public class EvaluatorFactory {
|
||||
null,
|
||||
Collections.singletonList(javaFileObject));
|
||||
if (!task.call().booleanValue()) {
|
||||
throw new RuntimeException("Compilation of " + source + " failed.\n" + out.toString());
|
||||
throw new CodegenException("Compilation of " + source + " failed.\n" + out.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -115,15 +115,15 @@ public class EvaluatorFactory {
|
||||
}
|
||||
};
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
} catch (SecurityException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
} catch (NoSuchMethodException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -90,11 +90,11 @@ public final class JavaWriter implements Appendable, CodeWriter{
|
||||
Object value = method.invoke(annotation);
|
||||
annotationConstant(value);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ public class SimpleCompiler implements JavaCompiler{
|
||||
}
|
||||
return path.toString();
|
||||
}catch(UnsupportedEncodingException e){
|
||||
throw new RuntimeException(e);
|
||||
throw new CodegenException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user