//解析try catch private void ParseTry() { CodeTry ret = new CodeTry(); ret.TryExecutable = ParseStatementBlock(Executable_Block.Context); ReadCatch(); ReadLeftParenthesis(); ret.Identifier = ReadIdentifier(); ReadRightParenthesis(); ret.CatchExecutable = ParseStatementBlock(Executable_Block.Context); m_scriptExecutable.AddScriptInstruction(new ScriptInstruction(Opcode.CALL_TRY, ret)); }
private void ParseTry() { CodeTry @try = new CodeTry { TryExecutable = this.ParseStatementBlock(Executable_Block.Context) }; this.ReadCatch(); this.ReadLeftParenthesis(); @try.Identifier = this.ReadIdentifier(); this.ReadRightParenthesis(); @try.CatchExecutable = this.ParseStatementBlock(Executable_Block.Context); this.m_scriptExecutable.AddScriptInstruction(new ScriptInstruction(Opcode.CALL_TRY, @try)); }
void ProcessTry() { CodeTry code = (CodeTry)m_scriptInstruction.Operand0; try { code.TryContext.Initialize(this); code.TryContext.Execute(); } catch (InteriorException ex) { code.CatchContext.Initialize(this, code.Identifier, ex.obj); code.CatchContext.Execute(); } catch (System.Exception ex) { code.CatchContext.Initialize(this, code.Identifier, m_script.CreateObject(ex)); code.CatchContext.Execute(); } }
void ProcessTry() { CodeTry code = (CodeTry)m_scriptInstruction.Operand0; try { new ScriptContext(m_script, code.TryExecutable, this).Execute(); } catch (InteriorException ex) { ScriptContext context = new ScriptContext(m_script, code.CatchExecutable, this); context.Initialize(code.Identifier, ex.obj); context.Execute(); } catch (System.Exception ex) { ScriptContext context = new ScriptContext(m_script, code.CatchExecutable, this); context.Initialize(code.Identifier, m_script.CreateObject(ex)); context.Execute(); } }
private void ProcessTry() { CodeTry @try = (CodeTry)this.m_scriptInstruction.operand0; try { new ScriptContext(this.m_script, @try.TryExecutable, this).Execute(); } catch (InteriorException exception) { ScriptContext context = new ScriptContext(this.m_script, @try.CatchExecutable, this); context.Initialize(@try.Identifier, exception.obj); context.Execute(); } catch (Exception exception2) { ScriptContext context2 = new ScriptContext(this.m_script, @try.CatchExecutable, this); context2.Initialize(@try.Identifier, this.m_script.CreateObject(exception2)); context2.Execute(); } }