whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] branch master updated: Improve error handling when data not yet present
Date Mon, 19 Mar 2018 19:36:45 GMT
This is an automated email from the ASF dual-hosted git repository.

curcuru 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 494c983  Improve error handling when data not yet present
494c983 is described below

commit 494c9837b6a79848c8702ab71b8ed242da4c2f7e
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Mon Mar 19 15:36:41 2018 -0400

    Improve error handling when data not yet present
---
 www/members/inactive.cgi | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/www/members/inactive.cgi b/www/members/inactive.cgi
index e45202b..4668168 100755
--- a/www/members/inactive.cgi
+++ b/www/members/inactive.cgi
@@ -29,7 +29,11 @@ _html do
   MEETINGS = ASF::SVN['private/foundation/Meetings']
   attendance = JSON.parse(IO.read("#{MEETINGS}/attendance.json"))
   latest = Dir["#{MEETINGS}/2*"].sort.last.untaint
-  tracker = JSON.parse(IO.read("#{latest}/non-participants.json"))
+  begin
+    tracker = JSON.parse(IO.read("#{latest}/non-participants.json"))
+  rescue Errno::ENOENT => err
+    raise IOError, "#{err.message} - Perhaps Whimsy doesn't have the current meeting's data
yet?", err.backtrace
+  end
 
   # determine user's name as found in members.txt
   name = ASF::Member.find_text_by_id($USER).to_s.split("\n").first

-- 
To stop receiving notification emails like this one, please contact
curcuru@apache.org.

Mime
View raw message