Don't crash with runtime exception

This commit is contained in:
serso 2016-03-14 21:40:49 +01:00
parent c09d7d6bf5
commit 636800178c

View File

@ -197,6 +197,8 @@ public class Calculator implements SharedPreferences.OnSharedPreferenceChangeLis
bus.post(new CalculationCancelledEvent(o, e, sequence)); bus.post(new CalculationCancelledEvent(o, e, sequence));
} catch (ParseException exception) { } catch (ParseException exception) {
onException(sequence, o, e, mr, pe, exception); onException(sequence, o, e, mr, pe, exception);
} catch (RuntimeException exception) {
onException(sequence, o, e, mr, pe, new ParseException(e, new CalculatorMessage(CalculatorMessages.syntax_error, MessageType.error)));
} }
} }