{"action":"created","issue":{"url":"https://api.github.com/repos/rimmartin/saxon-node/issues/9","labels_url":"https://api.github.com/repos/rimmartin/saxon-node/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/rimmartin/saxon-node/issues/9/comments","events_url":"https://api.github.com/repos/rimmartin/saxon-node/issues/9/events","html_url":"https://github.com/rimmartin/saxon-node/issues/9","id":104966086,"number":9,"title":"Exception handling","user":{"login":"seanmcilvenna","id":5384694,"avatar_url":"https://avatars.githubusercontent.com/u/5384694?v=3","gravatar_id":"","url":"https://api.github.com/users/seanmcilvenna","html_url":"https://github.com/seanmcilvenna","followers_url":"https://api.github.com/users/seanmcilvenna/followers","following_url":"https://api.github.com/users/seanmcilvenna/following{/other_user}","gists_url":"https://api.github.com/users/seanmcilvenna/gists{/gist_id}","starred_url":"https://api.github.com/users/seanmcilvenna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanmcilvenna/subscriptions","organizations_url":"https://api.github.com/users/seanmcilvenna/orgs","repos_url":"https://api.github.com/users/seanmcilvenna/repos","events_url":"https://api.github.com/users/seanmcilvenna/events{/privacy}","received_events_url":"https://api.github.com/users/seanmcilvenna/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-04T20:41:44Z","updated_at":"2015-09-05T02:20:56Z","closed_at":null,"body":"In my example, I am calling xsltProcessor.compile(xsltLocation) where xsltLocation points to an invalid location. When doing this in Node.JS, even though compile() is wrapped in a try/catch, it is causing the application server to crash. Why is try/catch not catching the errors produced from saxon?"},"comment":{"url":"https://api.github.com/repos/rimmartin/saxon-node/issues/comments/137894861","html_url":"https://github.com/rimmartin/saxon-node/issues/9#issuecomment-137894861","issue_url":"https://api.github.com/repos/rimmartin/saxon-node/issues/9","id":137894861,"user":{"login":"rimmartin","id":6502360,"avatar_url":"https://avatars.githubusercontent.com/u/6502360?v=3","gravatar_id":"","url":"https://api.github.com/users/rimmartin","html_url":"https://github.com/rimmartin","followers_url":"https://api.github.com/users/rimmartin/followers","following_url":"https://api.github.com/users/rimmartin/following{/other_user}","gists_url":"https://api.github.com/users/rimmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/rimmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimmartin/subscriptions","organizations_url":"https://api.github.com/users/rimmartin/orgs","repos_url":"https://api.github.com/users/rimmartin/repos","events_url":"https://api.github.com/users/rimmartin/events{/privacy}","received_events_url":"https://api.github.com/users/rimmartin/received_events","type":"User","site_admin":false},"created_at":"2015-09-05T02:20:56Z","updated_at":"2015-09-05T02:20:56Z","body":"I'm experimenting with repeating this error.\r\nEarlier I tried to get the error state back from the saxon with\r\n```cpp\r\nstd::cout<<\"exceptionOccurred \"<<xp->xsltProcessor->exceptionOccurred()<<std::endl;\r\n            if(xp->xsltProcessor->exceptionOccurred() || xp->xsltProcessor->exceptionCount()>0){\r\n                std::string errorMessage=\"# of \"+std::to_string(xp->xsltProcessor->exceptionCount());\r\n                v8::Isolate::GetCurrent()->ThrowException(v8::Exception::SyntaxError(String::NewFromUtf8(v8::Isolate::GetCurrent(), errorMessage.c_str())));\r\n                args.GetReturnValue().SetUndefined();\r\n                return;\r\n                \r\n            }\r\n```\r\nbut exceptionOccurred and exceptionCount never return anything and the exeption flies past.\r\n\r\nchecking if they are catchable..."}}