Update operator exception handling.
This commit is contained in:
@@ -47,7 +47,10 @@ namespace Cryville.Common.Pdt {
|
|||||||
internal void Call(byte* prmem, bool noset) {
|
internal void Call(byte* prmem, bool noset) {
|
||||||
_prmem = prmem;
|
_prmem = prmem;
|
||||||
_rfreq = false;
|
_rfreq = false;
|
||||||
try { Execute(); } catch (Exception) { _failure = true; }
|
try { Execute(); } catch (Exception ex) {
|
||||||
|
if (_rfreq) _etor.DiscardStack();
|
||||||
|
throw new InvalidOperationException("Evaluation failed", ex);
|
||||||
|
}
|
||||||
if (_failure) {
|
if (_failure) {
|
||||||
if (_rfreq) _etor.DiscardStack();
|
if (_rfreq) _etor.DiscardStack();
|
||||||
throw new InvalidOperationException("Evaluation failed");
|
throw new InvalidOperationException("Evaluation failed");
|
||||||
|
Reference in New Issue
Block a user