Module: EAAL::Exception
- Defined in:
- lib/eaal/eaal_exception.rb
Defined Under Namespace
Classes: APINotFoundError, EAALError, EveAPIException, HTTPError
Class Method Summary collapse
-
.EveAPIException(nr) ⇒ Object
creates the class for an EveAPIException.
-
.raiseEveAPIException(nr, msg) ⇒ Object
raise the eve API exceptions, class will be dynamicaly created by classname EveAPIException followed by the APIs exception Number.
Class Method Details
.EveAPIException(nr) ⇒ Object
creates the class for an EveAPIException
9 10 11 12 13 14 15 16 17 |
# File 'lib/eaal/eaal_exception.rb', line 9 def self.EveAPIException(nr) classname = "EveAPIException#{nr}" if not Object.const_defined? classname klass = Object.const_set(classname, Class.new(EAAL::Exception::EveAPIException)) else klass = Object.const_get(classname) end klass end |
.raiseEveAPIException(nr, msg) ⇒ Object
raise the eve API exceptions, class will be dynamicaly created by classname EveAPIException followed by the APIs exception Number
21 22 23 |
# File 'lib/eaal/eaal_exception.rb', line 21 def self.raiseEveAPIException(nr, msg) raise EAAL::Exception.EveAPIException(nr).new(msg) end |