diff --git a/Assets/Cryville/Common/Pdt/PdtOperator.cs b/Assets/Cryville/Common/Pdt/PdtOperator.cs index ac48982..7732ac5 100644 --- a/Assets/Cryville/Common/Pdt/PdtOperator.cs +++ b/Assets/Cryville/Common/Pdt/PdtOperator.cs @@ -47,7 +47,10 @@ namespace Cryville.Common.Pdt { internal void Call(byte* prmem, bool noset) { _prmem = prmem; _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 (_rfreq) _etor.DiscardStack(); throw new InvalidOperationException("Evaluation failed");