Change throw "..." to throw new Error("...") in the generated Javascript code

When throwing plain strings, the stack trace and original location of
the error seems to get lost, and you can't click on the exception in the
Firebug logs to jump to where the exception was thrown.