mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-11-01 20:14:27 +00:00
Print stack traces/add logging messages in several places
This will hopefully make it easier to track down various issues which might otherwise go unnoticed or provide little information. The main areas modified are those that external APIs may provide values for or interact with: various providers and ILuaObject/IPeripheral implementations. However, we do also log in a couple of other places which indicate a problem with this, or another, mod.
This commit is contained in:
1 parent
bdc438fc62
commit
44ba4069c1
8 files changed
+33
-17
No files matched your search
@@ -11,6 +11,7 @@ import dan200.computercraft.api.lua.ILuaContext;
|
||||
import dan200.computercraft.api.lua.ILuaTask;
|
||||
import dan200.computercraft.api.lua.LuaException;
|
||||
import dan200.computercraft.core.apis.ILuaAPI;
|
||||
import dan200.computercraft.core.logger.Logger;
|
||||
import dan200.computercraft.shared.computer.blocks.TileCommandComputer;
|
||||
import dan200.computercraft.shared.util.WorldUtil;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -98,6 +99,7 @@ public class CommandAPI implements ILuaAPI
|
||||
}
|
||||
catch( Throwable t )
|
||||
{
|
||||
Logger.error( "Error running command.", t );
|
||||
return new Object[]{ false, createOutput( "Java Exception Thrown: " + t.toString() ) };
|
||||
}
|
||||
}
|
||||
@@ -208,6 +210,7 @@ public class CommandAPI implements ILuaAPI
|
||||
catch( Throwable t )
|
||||
{
|
||||
// Ignore buggy command
|
||||
Logger.error( "Error running command.", t );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user