public DekiScriptOutputBuffer.Range Visit(DekiScriptReturnScope expr, DekiScriptExpressionEvaluationState state) { int marker = state.Buffer.Marker; try { if (state.FatalEvaluationError == null) { state.ThrowIfTimedout(); return(expr.Value.VisitWith(this, state)); } state.Push(state.FatalEvaluationError); } catch (DekiScriptReturnException e) { state.Push(e.Value); } catch (DekiScriptControlFlowException) { // nothing to do } catch (Exception e) { var error = DekiScriptLibrary.MakeErrorObject(e, state.Env); state.Runtime.LogExceptionInOutput(error); state.Push(new DekiScriptXml(DekiScriptLibrary.WebShowError((Hashtable)error.NativeValue))); } return(state.Buffer.Since(marker)); }
public DekiScriptExpression Visit(DekiScriptReturnScope expr, DekiScriptExpressionEvaluationState state) { return(DekiScriptExpression.ReturnScope(expr.Location, expr.Value.VisitWith(this, state))); }