-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
126 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# vim: fileencoding=utf-8 | ||
|
||
module RGRB | ||
module Plugin | ||
module UrlFetchTitle | ||
# 最大リダイレクト回数に到達した場合のエラーを示すクラス | ||
class MaxRedirectsReached < StandardError | ||
# 新しい MaxRedirectsReached インスタンスを返す | ||
# @param [String] table 表名 | ||
# @param [String] error_message エラーメッセージ | ||
def initialize(max_redirects = nil, error_message = nil) | ||
@max_redirects = max_redirects | ||
|
||
if !error_message && @max_redirects | ||
error_message = | ||
"最大リダイレクト回数 (#{@max_redirects}) に到達しました" | ||
end | ||
|
||
super(error_message) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters