Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruby horn raises exceptions on failure
- Loading branch information
Showing
8 changed files
with
75 additions
and
38 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,3 +1,3 @@ | ||
[submodule "felix"] | ||
path = felix | ||
url = git://github.com/variations-on-video/hydrant-felix.git | ||
url = git://github.com/avalonmediasystem/avalon-felix.git |
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
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,22 @@ | ||
module Rubyhorn::RestClient | ||
module Exceptions | ||
class RubyhornException < StandardError | ||
end | ||
|
||
class ServerError < RubyhornException | ||
attr_reader :status_code | ||
def initialize(status_code) | ||
@status_code = status_code | ||
super("Server responded with status code: #{status_code}.") | ||
end | ||
end | ||
|
||
class MissingRequiredParams < RubyhornException | ||
attr_reader :params | ||
def initialize(params) | ||
@params = params | ||
super("You failed to include #{params.join(', ')} in your request.") | ||
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
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