Modifying templating render function for browser environment so that exceptions are not wrapped