changeset 2294:81755b1e45cd

Updated
author MURAKAMI Masaki <c112124@h.koeki-u.ac.jp>
date Wed, 23 Jul 2014 19:30:49 +0900
parents 2f55507d81d8
children 190e04b6a2d2
files minato2014/accountcheck.rb
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/minato2014/accountcheck.rb	Wed Jul 23 19:28:08 2014 +0900
+++ b/minato2014/accountcheck.rb	Wed Jul 23 19:30:49 2014 +0900
@@ -25,7 +25,11 @@
 
 code = magic()
 #id = result.length
-id = db.execute(max).flatten(2)[0] + 1
+begin
+  id = db.execute(max).flatten(2)[0] + 1
+rescue
+  id = 1
+end
 #printf("%04d",id)
 
 mg = code[id]

yatex.org