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
@@ -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