Thank you Geert. Yes, I know, that's what I used for CPF for instance. But if I try here, on 8.0-5, "errors" is not declared. Complete repro:
- create new appserver on port xxx - set modules to dir zzz - set error handler to "zzz/handler.sjs" - create zzz/index.sjs with "throw 'Hello, world!';" - create zzz/handler.sjs with "errors;" Then go to http://localhost:xxx/index.sjs. This returns "ReferenceError: errors is not defined". -- Florent Georges http://fgeorges.org/ http://h2o.consulting/ - New website! On 28 November 2016 at 15:01, Geert Josten wrote: > Hi Florent, > > The general pattern seems to be that such external vars are kind of just > there (as if they are predeclared). Javascript doesn¹t work with > namespaces though, so $err:errors becomes $errors (or just `errors`) in > JavaScript.. > > Cheers > > On 11/28/16, 2:55 PM, "[email protected] on behalf > of Florent Georges" <[email protected] on behalf of > [email protected]> wrote: > >>Hi, >> >>In an error handler in XQuery, I can access the originally thrown >>error by binding specific external variables. But I cannot find any >>information on how to do this with JavaScript. >> >>Any pointer? On latest ML 8 (info specific to ML 9 EA welcome as well). >> >>Regards, >> >>-- >>Florent Georges >>http://fgeorges.org/ >>http://h2o.consulting/ - New website! >>_______________________________________________ >>General mailing list >>[email protected] >>Manage your subscription at: >>http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > [email protected] > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
