Defect #273

Internal error occurs when hudson has no response.

Added by Haru Iida 8 months ago. Updated 7 months ago.

Status:終了 Start:01/11/2010
Priority:通常 Due date:
Assigned to:Toshiyuki Ando % Done:

100%

Category:- Spent time: -
Target version:1.0.2

Description

Hudsonが重くて応答が無い場合、HudsonプラグインでInternal Errorが発生します。

Timeout::Error (execution expired):
    /usr/local/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill'
    /usr/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
    /usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
    /usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'
    /usr/local/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'
    /usr/local/lib/ruby/1.8/net/http.rb:2009:in `read_new'
    /usr/local/lib/ruby/1.8/net/http.rb:1050:in `request'
    /usr/local/lib/ruby/1.8/net/http.rb:1037:in `request'
    /usr/local/lib/ruby/1.8/net/http.rb:543:in `start'
    /usr/local/lib/ruby/1.8/net/http.rb:1035:in `request'
    /vendor/plugins/redmine_hudson/app/helpers/hudson_helper.rb:16:in
`open_hudson_api'

Associated revisions

Revision 416
Added by Toshiyuki Ando 8 months ago

fixes #273
specify error class

History

Updated by Toshiyuki Ando 8 months ago

うーん。

    begin
      response = http.request(request)
    rescue => error
      raise HudsonApiException.new(error)
    end

ではキャッチできないらしい。ちょっとググってみたら…。

◆Timeout::Error に注意
http://d.hatena.ne.jp/dreammind/20090217/1234813224

  • rescueはエラータイプを省略するとStandartErrorのサブクラスの例外を捕捉する
  • Timeout::ErrorはInterruptを継承したクラスでStanderErrorには属していない

気をつけねば…。

Updated by Toshiyuki Ando 8 months ago

  • Status changed from 新規 to 解決
  • % Done changed from 0 to 100

更新履歴 r416 で適用されました。

Updated by Toshiyuki Ando 8 months ago

  • Target version set to 1.0.2

Updated by Toshiyuki Ando 7 months ago

  • Status changed from 解決 to 終了

Also available in: Atom PDF