better handling of unknown exceptions

This commit is contained in:
gnembon committed 2019-07-11 14:43:49 -03:00
1 parent 75a8449228
commit 6e2ee7605f
2 files changed
+69 -1

No files matched your search

+28
View File
@@ -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