You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2018/06/28 13:59:06 UTC
[whimsy] branch master updated: Fail if podlings.xml cannot be
parsed OK
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new ef74e09 Fail if podlings.xml cannot be parsed OK
ef74e09 is described below
commit ef74e0962882780c877ad9f5d6a25a340867970c
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jun 28 14:59:04 2018 +0100
Fail if podlings.xml cannot be parsed OK
---
lib/whimsy/asf/podling.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 21bdec6..a26d848 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -151,6 +151,8 @@ module ASF
if @mtime != File.mtime(podlings_xml)
@list = []
podlings = Nokogiri::XML(File.read(podlings_xml))
+ # check for errors as they adversely affect the generated output
+ raise Exception.new("#{podlings.errors.inspect}") if podlings.errors.size > 0
podlings.search('podling').map do |node|
@list << new(node)
end