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.
This commit is contained in:
parent
1b709f6207
commit
14c2979aa6
|
@ -38,7 +38,12 @@ module RailsGuides
|
|||
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 "."
|
||||
|
|
Loading…
Reference in New Issue