mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-03 13:30:25 +07:00
Improved error logging of remote reading/writing
This commit is contained in:
parent
0216425209
commit
3898602f0e
@ -63,6 +63,8 @@ public class RemoteReadGenerator {
|
||||
readBlock.nextControlFlow("else if(id == " + entry.id + ")");
|
||||
}
|
||||
|
||||
readBlock.beginControlFlow("try");
|
||||
|
||||
//concatenated list of variable names for method invocation
|
||||
StringBuilder varResult = new StringBuilder();
|
||||
|
||||
@ -118,6 +120,9 @@ public class RemoteReadGenerator {
|
||||
"__forward(player.clientid" + (varResult.length() == 0 ? "" : ", ") + varResult.toString() + ")");
|
||||
}
|
||||
|
||||
readBlock.nextControlFlow("catch (java.lang.Exception e)");
|
||||
readBlock.addStatement("throw new java.lang.RuntimeException(\"Failed to to read remote method '"+entry.element.getSimpleName() +"'!\", e)");
|
||||
readBlock.endControlFlow();
|
||||
}
|
||||
|
||||
//end control flow if necessary
|
||||
|
Loading…
Reference in New Issue
Block a user