[Hiki-dev:00786] Re: ユーザ管理プラグインの追加 (Re: ユーザ管理対応への布石のコミット)

Back to archive index

GOTO Naohisa ngoto****@gen-i*****
2005年 6月 14日 (火) 22:25:58 JST


ngotoこと後藤@阪大です。

misc/plugin/en/edit_user.rb に label_edit_user_add_title が存在しないので
英語で使っているとエラーになります。

--- misc/plugin/en/edit_user.rb 9 Jun 2005 08:12:39 -0000       1.2
+++ misc/plugin/en/edit_user.rb 14 Jun 2005 12:53:20 -0000
@@ -3,6 +3,7 @@

 def label_edit_user_config; 'Edit users'; end
 def label_edit_user_title; 'Delete users / Change passwords'; end
+def label_edit_user_add_title; 'Add users'; end
 def label_edit_user_description
   'Each line has one user, which is in the form of "name password".'
 end


さらに、私は mod_ruby で使っていますが、上記の場所でエラーが発生すると、
本来は hiki.cgi にてrescueされてエラー内容が表示されるはずが、なぜか
$! と $@ が nil になるらしく、Internal Server Error が出てしまいました。
以下のように明示的に変数に代入すると大丈夫です。

--- hiki.cgi    19 May 2005 13:25:48 -0000      1.30
+++ hiki.cgi    14 Jun 2005 13:21:28 -0000
@@ -29,16 +29,16 @@
-rescue Exception
+rescue Exception => evar
   if cgi then
     print cgi.header( 'type' => 'text/html' )
   else
     print "Content-Type: text/html\n\n"
   end

   require 'cgi'
   puts '<html><head><title>Hiki Error</title></head><body><pre>'
-  puts CGI.escapeHTML( "#$! (#{$!.class})\n" )
-  puts CGI.escapeHTML( $@.join( "\n" ) )
+  puts CGI.escapeHTML( "#$! (#{evar.class})\n" )
+  puts CGI.escapeHTML( evar.backtrace.join( "\n" ) )
   puts '</pre></body></html>'
 end

-- 
後藤 直久  ngoto****@gen-i*****
大阪大学微生物病研究所 遺伝情報実験センター ゲノム情報解析分野(安永研)



Hiki-dev メーリングリストの案内
Back to archive index