Skip to content

Commit

Permalink
Error reporting is a bit better now
Browse files Browse the repository at this point in the history
Now you can see the actual page the error happened in, and the correct
page to view the error.
  • Loading branch information
LightGuard committed Apr 9, 2014
1 parent 1cbdd3a commit cf6db82
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/awestruct/handlers/base_tilt_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,13 @@ def rendered_content(context, with_layouts=true)
ExceptionHelper.log_message "Please see #{File.join site.dir, output_path} for more information"
return ExceptionHelper.html_error_report e, relative_source_path
rescue Exception => e
ExceptionHelper.log_message "An error during rendering #{File.join site.dir, relative_source_path} occurred."
ExceptionHelper.log_message "Please see #{File.join site.dir, output_path} for more information"
error_page = context[:page]
if error_page[:__is_layout]
ExceptionHelper.log_message "An error during rendering layout file #{File.join site.dir, error_page.source_path} occurred."
else
ExceptionHelper.log_message "An error during rendering #{File.join site.dir, error_page.source_path} occurred."
end
ExceptionHelper.log_message "Please see #{File.join site.dir, error_page.output_path} for more information"
return ExceptionHelper.html_error_report e, relative_source_path
end
end
Expand Down

0 comments on commit cf6db82

Please sign in to comment.