michael@0: function f() { michael@0: var msg = ''; michael@0: try { michael@0: var x = undefined; michael@0: print(x.foo); michael@0: } catch (e) { michael@0: msg = '' + e; michael@0: } michael@0: assertEq(msg, "TypeError: x is undefined"); michael@0: } michael@0: f();