Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
[B! Ruby][error] takaesuのブックマーク
[go: Go Back, main page]

タグ

Rubyとerrorに関するtakaesuのブックマーク (1)

  • Rails の rescue_from で拾えない例外を exceptions_app で処理する - Qiita

    rescue_from で拾えない例外がある Rails が用意してくれている rescue_from は controller の外側で発生した例外を拾ってくれない。 例えばパラメータに不正なエンコーディングが含まれるときに、Rails は ActionController::BadRequest を例外として投げる。しかし、この処理は Rails の routing 層で行われているため rescue_from で捕捉することはできない。 そのため Rails の外で発生した例外を捕捉していない場合、ユーザには意図していないエラーページが見えている可能性がある。 Rails の外で起きる例外は exceptions_app で処理するのがお手軽 例えば config/initializers/exceptions_app.rb に以下のコードを書いておく(ErrorsControlle

    Rails の rescue_from で拾えない例外を exceptions_app で処理する - Qiita
    takaesu
    takaesu 2014/09/09
    エラー処理、例外処理
  • 1