Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ashok Raja Dhanushkodi 1 post 21 karma points
    Jun 17, 2014 @ 11:20
    Ashok Raja Dhanushkodi
    1

    UmbracoHelper.RenderTemplate - Error handling

    We are using RenderTemplate in a loop to render widgets. The issue is that if an exception occurs while rendering a widget, the exception details are rendered in the page.

    Just wondering whether there is any way to handle this best as what we're doing now is throwing a custom exception if the RenderTemplate Html starts with "<!-- Error rendering template" or "<!-- Could not render template".

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Oct 22, 2014 @ 23:45
    Nicholas Westby
    1

    For anybody else who comes across this, you should be able to get errors to be thrown by opening up your umbracoSettings.config and setting this:

    <MacroErrors>throw</MacroErrors>
    
Please Sign in or register to post replies

Write your reply to:

Draft