Is it possible to create a custom error message if an error is throw in a XSLT file? Currently the user gets so see: Error parsing XSLT file: \xslt\HeaderImage.xslt. A custom message would be better. If this can't be done it should be in the next Umbraco version :).
Doesn't look like it is possible without modifying the source right now as all exceptions get trapped, and the output is hard coded, so there isn't anything to hook into.
If you wanted to do this, you'd need to modify the loadMacroXslt method in umbraco.macro.
For now I'll just add some extra if statements in my XSLT :). Still I think it would be a good thing to be able to create a custom error message. Same thing goes for user controls. A custom error would create a better user experience.
Xslt custom error message
Hello,
Is it possible to create a custom error message if an error is throw in a XSLT file? Currently the user gets so see: Error parsing XSLT file: \xslt\HeaderImage.xslt. A custom message would be better. If this can't be done it should be in the next Umbraco version :).
Jeroen
Doesn't look like it is possible without modifying the source right now as all exceptions get trapped, and the output is hard coded, so there isn't anything to hook into.
If you wanted to do this, you'd need to modify the loadMacroXslt method in umbraco.macro.
Matt
Hi Matt,
For now I'll just add some extra if statements in my XSLT :). Still I think it would be a good thing to be able to create a custom error message. Same thing goes for user controls. A custom error would create a better user experience.
Jeroen
If you REALLY wanted to display a message, I guess you could do some JS to find that string format and change it to a more friendly message?
You could do that, but it's not the way you want this to work. I've created a workitem for this. Please vote :).
http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=27058
is working on a reply...