better handling of unknown exceptions
This commit is contained in:
1 parent
75a8449228
commit
6e2ee7605f
2 files changed
+69
-1
No files matched your search
@@ -506,6 +506,14 @@ public class Expression implements Cloneable
|
||||
{
|
||||
throw new ExpressionException(e, token, "Your math is wrong, "+exc.getMessage());
|
||||
}
|
||||
catch (ExitStatement exit)
|
||||
{
|
||||
throw exit;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw new ExpressionException(e, token, "Error while evaluating expression: "+exc.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -532,6 +540,14 @@ public class Expression implements Cloneable
|
||||
{
|
||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||
}
|
||||
catch (ExitStatement exit)
|
||||
{
|
||||
throw exit;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -557,6 +573,14 @@ public class Expression implements Cloneable
|
||||
{
|
||||
throw new ExpressionException(e, token, "Your math is wrong, "+exc.getMessage());
|
||||
}
|
||||
catch (ExitStatement exit)
|
||||
{
|
||||
throw exit;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw new ExpressionException(e, token, "Error while evaluating expression: "+exc.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -663,6 +687,14 @@ public class Expression implements Cloneable
|
||||
{
|
||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||
}
|
||||
catch (ExitStatement exit)
|
||||
{
|
||||
throw exit;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -725,7 +757,7 @@ public class Expression implements Cloneable
|
||||
{
|
||||
retVal = returnStatement.retval;
|
||||
}
|
||||
catch (ThrowStatement throwStatement)
|
||||
catch (ThrowStatement throwStatement) // might not be really necessary
|
||||
{
|
||||
retVal = throwStatement.retval;
|
||||
rethrow = true;
|
||||
@@ -738,6 +770,14 @@ public class Expression implements Cloneable
|
||||
{
|
||||
throw new ExpressionException(function_context, t, "Your math is wrong, "+exc.getMessage());
|
||||
}
|
||||
catch (ExitStatement exit)
|
||||
{
|
||||
throw exit;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||
}
|
||||
for (String global: globals)
|
||||
{
|
||||
LazyValue lv = newFrame.getVariable(global);
|
||||
|
||||
@@ -108,6 +108,18 @@ public abstract class Fluff
|
||||
{
|
||||
throw new ExpressionException(e, t, exc.getMessage());
|
||||
}
|
||||
catch (ArithmeticException exc)
|
||||
{
|
||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||
}
|
||||
catch (Expression.ExitStatement exit)
|
||||
{
|
||||
throw exit;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +166,14 @@ public abstract class Fluff
|
||||
{
|
||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||
}
|
||||
catch (Expression.ExitStatement exit)
|
||||
{
|
||||
throw exit;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,6 +202,14 @@ public abstract class Fluff
|
||||
{
|
||||
throw new ExpressionException(e, t, "Your math is wrong, "+exc.getMessage());
|
||||
}
|
||||
catch (Expression.ExitStatement exit)
|
||||
{
|
||||
throw exit;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw new ExpressionException(e, t, "Error while evaluating expression: "+exc.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user