Skip to content

Commit e5994d4

Browse files
committed
update: 优化 Generator 异常处理
1 parent 5e4cc68 commit e5994d4

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

jmg-antsword/src/main/java/jmg/antsword/generator/AntSwordGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public byte[] modifyShell(String className, AbstractConfig config) {
4949
ctClass.detach();
5050
} catch (Exception e) {
5151
e.printStackTrace();
52+
throw new RuntimeException(e);
5253
}
5354
return bytes;
5455
}

jmg-behinder/src/main/java/jmg/behinder/generator/BehinderGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public byte[] modifyShell(String className, AbstractConfig config) {
4949
ctClass.detach();
5050
} catch (Exception e) {
5151
e.printStackTrace();
52+
throw new RuntimeException(e);
5253
}
5354
return bytes;
5455
}

jmg-custom/src/main/java/jmg/custom/generator/CustomGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public void initShell(AbstractConfig config) {
3333
ctClass.detach();
3434
} catch (Exception e) {
3535
e.printStackTrace();
36+
throw new RuntimeException(e);
3637
}
3738
}
3839

jmg-godzilla/src/main/java/jmg/godzilla/generator/GodzillaGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public byte[] modifyShell(String className, AbstractConfig config) {
6060
ctClass.detach();
6161
} catch (Exception e) {
6262
e.printStackTrace();
63+
throw new RuntimeException(e);
6364
}
6465
return bytes;
6566
}

jmg-neoregeorg/src/main/java/jmg/neoregeorg/generator/NeoreGeorgGenerator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public byte[] modifyShell(String className, AbstractConfig config) {
4949
ctClass.detach();
5050
} catch (Exception e) {
5151
e.printStackTrace();
52+
throw new RuntimeException(e);
5253
}
5354
return bytes;
5455
}

jmg-suo5/src/main/java/jmg/suo5/generator/Suo5Generator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public byte[] modifyShell(String className, AbstractConfig config) {
5151
ctClass.detach();
5252
} catch (Exception e) {
5353
e.printStackTrace();
54+
throw new RuntimeException(e);
5455
}
5556
return bytes;
5657
}

0 commit comments

Comments
 (0)