[swfinterp] Better error message
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 17 Nov 2014 02:53:32 +0000 (03:53 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 17 Nov 2014 02:53:32 +0000 (03:53 +0100)
test/swftests/DictCall.as
youtube_dl/swfinterp.py

index 236efd84821b1460aff2cf8434ef8bee69e3472a..c2d174cc2e07630ea4dd084ab3b9ac35daa18eba 100644 (file)
@@ -4,7 +4,7 @@
 package {
 public class DictCall {
     public static function main(d:Object):int{
-       return d.x + d.y;
+        return d.x + d.y;
     }
 }
 }
index 7c0ee1e61a89d13d56bf0f2c54111bd738054890..58da6c586ffd863d054626a638724f5781545320 100644 (file)
@@ -564,7 +564,7 @@ class SWFInterpreter(object):
                     elif isinstance(pname, compat_str):  # Member access
                         obj = stack.pop()
                         assert isinstance(obj, (dict, _ScopeDict)), \
-                            'Accessing member on %r' % obj
+                            'Accessing member %r on %r' % (pname, obj)
                         stack.append(obj[pname])
                     else:  # Assume attribute access
                         idx = stack.pop()