Pass additional data when template raises an exception