From bb32f923cfaeff48c1bf28f7e4a81cc3ecbd1f63 Mon Sep 17 00:00:00 2001 From: Lord-McSweeney <84632019+Lord-McSweeney@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:19:26 +0300 Subject: [PATCH] avm2: Use correct null parameter error in `registerClassAlias` --- core/src/avm2/globals/flash/net.as | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/avm2/globals/flash/net.as b/core/src/avm2/globals/flash/net.as index cea14640205b..13006f7dbef1 100644 --- a/core/src/avm2/globals/flash/net.as +++ b/core/src/avm2/globals/flash/net.as @@ -10,9 +10,13 @@ package flash.net { public native function navigateToURL(request:URLRequest, window:String = null):void; public function registerClassAlias(name:String, object:Class):void { - if (name == null || object == null) { - throw new TypeError("FIXME - what error should I use"); + if (name == null) { + throw new TypeError("Error #2007: Parameter aliasName must be non-null.", 2007); } + if (object == null) { + throw new TypeError("Error #2007: Parameter classObject must be non-null.", 2007); + } + this._aliasToClass[name] = object; this._classToAlias[object] = name; }