Module: Wowr::Exceptions
- Defined in:
- lib/wowr/exceptions.rb
Defined Under Namespace
Classes: ArenaTeamNameNotSet, ArenaTeamNotFound, CharacterNameNotSet, CharacterNotFound, CookieNotSet, ElementNotFoundError, EmptyPage, GuildBankNotFound, GuildNameNotSet, GuildNotFound, InvalidArenaTeamSize, InvalidIconSize, InvalidIconType, InvalidLoginDetails, InvalidSearchType, InvalidXML, ItemNotFound, NoSearchString, RealmNotSet, SearchError, ServerDoesNotExist
Class Method Summary collapse
Class Method Details
.raise_me(code, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/wowr/exceptions.rb', line 3 def self.raise_me(code, = {}) case code when "noCharacter" raise CharacterNotFound.new("Character '#{[:character_name]}' not found.") else raise StandardError.new("The XML returned an error: #{code.to_s}") end end |