1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-26 07:03:22 +00:00

Log internal Cobalt VM errors

See #1307
This commit is contained in:
Jonathan Coates 2023-01-17 20:37:16 +00:00
parent 86b60855d6
commit 9e1de23f4a
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
3 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,7 @@ parchmentMc = "1.19.2"
asm = "9.3"
autoService = "1.0.1"
checkerFramework = "3.12.0"
cobalt = "0.5.9"
cobalt = "0.5.10"
fastutil = "8.5.9"
guava = "31.1-jre"
jetbrainsAnnotations = "23.0.0"

View File

@ -15,10 +15,12 @@ public final class Logging {
public static final Marker COMPUTER_ERROR = MarkerFactory.getMarker("COMPUTER_ERROR");
public static final Marker HTTP_ERROR = MarkerFactory.getMarker("COMPUTER_ERROR.HTTP");
public static final Marker JAVA_ERROR = MarkerFactory.getMarker("COMPUTER_ERROR.JAVA");
public static final Marker VM_ERROR = MarkerFactory.getMarker("COMPUTER_ERROR.VM");
static {
HTTP_ERROR.add(COMPUTER_ERROR);
JAVA_ERROR.add(COMPUTER_ERROR);
VM_ERROR.add(COMPUTER_ERROR);
}
private Logging() {

View File

@ -83,6 +83,7 @@ public CobaltLuaMachine(MachineEnvironment environment) {
}
});
})
.errorReporter(e -> LOG.error(Logging.VM_ERROR, "Error occurred in the Lua runtime. Computer will continue to execute.", e))
.build();
globals = new LuaTable();