Permalink
Browse files

Add exception handling to rake guides:validate

If the validation of a guide encounters an exception, inform about it
and continue with the loop to validate the rest.
  • Loading branch information...
jaimeiniesta committed Aug 24, 2012
1 parent 1b709f6 commit 14c2979aa65e37cf8b5aef340a06b2aeca9b52e5
Showing with 6 additions and 1 deletion.
  1. +6 −1 guides/w3c_validator.rb
View
@@ -38,7 +38,12 @@ def validate
errors_on_guides = {}
guides_to_validate.each do |f|
results = validator.validate_file(f)
begin
results = validator.validate_file(f)
rescue Exception => e
puts "\nCould not validate #{f} because of #{e}"
next
end
if results.validity
print "."

0 comments on commit 14c2979

Please sign in to comment.