public sealed override void Initialize(AVSValue args, ScriptEnvironment env) { try { using (new DynamicEnvironment(env)) { OverlayUtils.InitArgs(this, args); Initialize(args); base.Initialize(args, env); } topLevel = new DynamicEnvironment(env, false); AfterInitialize(); topLevel.Detach(); } catch (Exception ex) { try { DisposeAll(); } catch { // ignored } finally { if (ex is SEHException) { throw new AvisynthException("Runtime function call error: " + DynamicEnvironment.LastError); } DynamicEnvironment.LastError = ex.Message; throw new AvisynthException(ex.Message); } } }
public sealed override void Initialize(AVSValue args, ScriptEnvironment env) { try { using (new DynamicEnvironment(env)) { OverlayUtils.InitArgs(this, args); Initialize(args); base.Initialize(args, env); } topLevel = new DynamicEnvironment(env, false); AfterInitialize(); topLevel.Detach(); } catch (Exception ex) { try { DisposeAll(); } finally { throw ex; } } }