Report stack traces through the logger (#1050)
This commit is contained in:
1 parent
4a580a5a42
commit
7486670918
7 files changed
+16
-17
No files matched your search
@@ -1174,7 +1174,7 @@ public class CarpetEventServer
|
||||
}
|
||||
catch (NullPointerException | InvalidCallbackException | IntegrityException error)
|
||||
{
|
||||
CarpetScriptServer.LOG.error("Got exception: "+error.getMessage());
|
||||
CarpetScriptServer.LOG.error("Got exception when running event call ", error);
|
||||
return CallbackResult.FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ public class Expression
|
||||
if (exc instanceof ResolvedException)
|
||||
return exc;
|
||||
// unexpected really - should be caught earlier and converted to InternalExpressionException
|
||||
exc.printStackTrace();
|
||||
CarpetSettings.LOG.error("Unexpected exception while running Scarpet code", exc);
|
||||
return new ExpressionException(c, e, token, "Error while evaluating expression: "+exc);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package carpet.script.value;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import carpet.script.exception.InternalExpressionException;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonPrimitive;
|
||||
@@ -42,7 +43,7 @@ public abstract class Value implements Comparable<Value>, Cloneable
|
||||
catch (CloneNotSupportedException e)
|
||||
{
|
||||
// should not happen
|
||||
e.printStackTrace();
|
||||
CarpetSettings.LOG.catching(e);
|
||||
throw new InternalExpressionException("Variable of type "+getTypeString()+" is not cloneable. Tell gnembon about it, this shoudn't happen");
|
||||
}
|
||||
copy.boundVariable = var;
|
||||
|
||||
Reference in new issue
Block a user