Rescue the entire method instead of just a `begin` block

This commit is contained in:
Parker Moore 2013-04-12 22:25:58 +03:00
parent 0884a52fea
commit 810a29c719
1 changed files with 7 additions and 9 deletions

View File

@ -15,15 +15,13 @@ module Jekyll
# #
# Returns nothing # Returns nothing
def self.process_site(site) def self.process_site(site)
begin site.process
site.process rescue Jekyll::FatalException => e
rescue Jekyll::FatalException => e puts
puts puts "ERROR: YOUR SITE COULD NOT BE BUILT:"
puts "ERROR: YOUR SITE COULD NOT BE BUILT:" puts "------------------------------------"
puts "------------------------------------" puts e.message
puts e.message exit(1)
exit(1)
end
end end
end end
end end