elexis-eu / lexonomy

A cloud-based, open-source system for writing and publishing dictionaries.
http://www.lexonomy.eu/
MIT License
86 stars 29 forks source link

Informative error message if XSLT transform fails #126

Open jan-niestadt opened 5 years ago

jan-niestadt commented 5 years ago

If you use your own XSLT stylesheet, but it contains an error (e.g. a XSLT 2.0 function, which are not supported), Lexonomy will simply not show any articles, without showing an error message. It would be helpful to signal that something went wrong with the XSLT, indicating what the problem was and on which line it occurred; otherwise users are left to guess what they did wrong.

jan-niestadt commented 5 years ago

I see the error is printed on the console, so it's not a problem for local debugging. But users working on lexonomy.eu will still appreciate the feedback.

gareins commented 5 years ago

There is a callback in parse() command, which can be used to detect the error. However I think that this can be designed very similarly to how I am trying to redesign the database module (see #124) and then errors are handled automatically within "our" xslt module.