/// <summary> /// Initialize try-panic environment /// </summary> /// <param name="args">Label name of relative OnPanic statement</param> public static void TryLabel(object args) { if (BasePanic.TryScopeTarget != null) { BasePanic.Throw("Can not initialize try environment in the scope of another try environment", 7, "PreRuntime"); } BasePanic.TryScopeTarget = CurrentFunctionPointer.FindLabel((string)args); }
/// <summary> /// Initialize try-panic environment /// </summary> /// <param name="args">Instruction index of relative OnPanic statement</param> public static void Try(object args) { if (BasePanic.TryScopeTarget != null) { BasePanic.Throw("Can not initialize try environment in the scope of another try environment", 14, "PreRuntime"); } BasePanic.TryScopeTarget = (int)args; }
/// <summary> /// Throws a new exception with a string parameter as message /// </summary> /// <param name="args"></param> public static void RvmThrow(object args) { BasePanic.Throw(Stack.Pop().Cast <CacheTable>()); }