Print line number of the error lazyvm
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 11 Dec 2012 10:14:08 +0100
branchlazyvm
changeset 3013e01766b681e
parent 300 39695cc9a54f
child 302 af9c8df8a660
Print line number of the error
vm/src/main/java/org/apidesign/vm4brwsr/VMLazy.java
     1.1 --- a/vm/src/main/java/org/apidesign/vm4brwsr/VMLazy.java	Tue Dec 11 09:48:37 2012 +0100
     1.2 +++ b/vm/src/main/java/org/apidesign/vm4brwsr/VMLazy.java	Tue Dec 11 10:14:08 2012 +0100
     1.3 @@ -80,7 +80,7 @@
     1.4          "try {\n" +
     1.5          "  new Function(script)(loader, name);\n" +
     1.6          "} catch (ex) {\n" +
     1.7 -        "  throw 'Cannot compile ' + ex + ' script:\\\\n' + script;\n" +
     1.8 +        "  throw 'Cannot compile ' + ex + ' line: ' + ex.lineNumber + ' script:\\n' + script;\n" +
     1.9          "}\n" +
    1.10          "return vm[name](false);\n"
    1.11      )