forked from ruby-oembed/ruby-oembed
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
module OEmbed | ||
NotFound = Class.new(StandardError) | ||
UnknownFormat = Class.new(StandardError) | ||
UnknownResponse = Class.new(StandardError) | ||
class NotFound < StandardError | ||
def to_s | ||
"No embeddable content at '#{super}'" | ||
end | ||
end | ||
|
||
class UnknownFormat < StandardError | ||
def to_s | ||
"The provider doesn't support the '#{super}' format" | ||
end | ||
end | ||
|
||
class UnknownResponse < StandardError | ||
def to_s | ||
"Got unkown response (#{super}) from server" | ||
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