Illustrate error handling for function defined in eval() but called in normal code.
- Load javascript file via XMLHttpRequest
- eval() it.
- Call the function
prod(animal) three times, two correct, one error.
- error when the function
prod(animal) is called with no argument.
01/2007 Works in Firebug 1.1b9 and Fireclipse:
- Halts on error, positions Script tab to line of error call (animal.say())
- Console tab reports error ("animal has no properties") and source line of error ("animal.say()") correctly.
- Console tab error message links to stack with two entries, "prod(undefined)"
and "__top_level__()".
- Both entries in stack are linked to correct source lines in Script tab window
- Javascript console reports error against data: url buffer on correct line