Quantcast

teipublisher error handling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

teipublisher error handling

Eduard Drenth
Dear all,

Is it possible to define an error handler that prevents stacktraces being presented to users?

Instead it should write some logging and tell the user what (not) to do.

Eduard Drenth, Software Architekt

[hidden email]

Doelestrjitte 8
8911 DX  Ljouwert
+31 58 234 30 47

gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: teipublisher error handling

Joe Wicentowski
Hi Eduard,

> Is it possible to define an error handler that prevents stacktraces being presented to users?
>
> Instead it should write some logging and tell the user what (not) to do.

eXist's URL rewriting mechanism lets you specify an error handler for
each dispatch directive in your controller.xql.  For an example, see:

  https://github.com/HistoryAtState/hsg-shell/blob/master/controller.xql#L51-L54

(where this and nearly every <dispatch> directive has an
<error-handler>).  There is also an example in the TEI Publisher App's
own controller.xql:

  http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/blob/master/controller.xql#L80-83

It is also used in the controller.xql for apps generated by the TEI
Publisher App's app generator:

  http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/blob/master/templates/basic/controller.xql#L68-71

If in your own app there is an action you're seeing where you're
getting a raw stack trace, I would advise that you check the relevant
controller.xql file to see if the dispatch directive responsible for
that URL has an <error-handler> action or not.

I notice that the <error-handler> action isn't documented in the
relevant article in the eXist-db documentation at
http://exist-db.org/exist/apps/doc/urlrewrite.xml, so I have filed an
issue in the documentation app:

  https://github.com/eXist-db/documentation/issues/105

Joe

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: teipublisher error handling

Eduard Drenth
Great!

Eduard Drenth, Software Architekt

[hidden email]

Doelestrjitte 8
8911 DX  Ljouwert
+31 58 234 30 47

gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43

________________________________________
From: Joe Wicentowski <[hidden email]>
Sent: Wednesday, March 29, 2017 3:32 PM
To: Eduard Drenth
Cc: [hidden email]
Subject: Re: [Exist-open] teipublisher error handling

Hi Eduard,

> Is it possible to define an error handler that prevents stacktraces being presented to users?
>
> Instead it should write some logging and tell the user what (not) to do.

eXist's URL rewriting mechanism lets you specify an error handler for
each dispatch directive in your controller.xql.  For an example, see:

  https://github.com/HistoryAtState/hsg-shell/blob/master/controller.xql#L51-L54

(where this and nearly every <dispatch> directive has an
<error-handler>).  There is also an example in the TEI Publisher App's
own controller.xql:

  http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/blob/master/controller.xql#L80-83

It is also used in the controller.xql for apps generated by the TEI
Publisher App's app generator:

  http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/blob/master/templates/basic/controller.xql#L68-71

If in your own app there is an action you're seeing where you're
getting a raw stack trace, I would advise that you check the relevant
controller.xql file to see if the dispatch directive responsible for
that URL has an <error-handler> action or not.

I notice that the <error-handler> action isn't documented in the
relevant article in the eXist-db documentation at
http://exist-db.org/exist/apps/doc/urlrewrite.xml, so I have filed an
issue in the documentation app:

  https://github.com/eXist-db/documentation/issues/105

Joe

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...