what should phantomjs do when an uncaught exception happens?

16 views
Skip to first unread message

Paul Traina

unread,
Aug 13, 2015, 9:33:04 PM8/13/15
to phantomjs
Both 1.9.2 and a just-compiled 2.0.1-development from github hang when I try this snippet:

$ cat bar.js

console.log("one");

throw "test exception";

console.log("two");

throw "test exception 2";

console.log("three");

$ phantomjs baz.js

one

test exception


  baz.js:2 in global code

^C


I don't think hanging is the right answer.


I filed an issue on github, but was trying to understand if I'm missing something conceptually,

since it is technically a headless BROWSER, maybe exiting isn't the right answer, but I was

trying to write some code with capserjs and my exception handlers were going into infinite loops

and broke it down into this problem with phantomjs.

Paul Traina

unread,
Aug 14, 2015, 1:18:42 PM8/14/15
to phan...@googlegroups.com
Ignore me, I understand what PhantomJS needs now.
Reply all
Reply to author
Forward
0 new messages