Exception: ErrorBase
- Inherits:
-
StandardError
- Object
- StandardError
- ErrorBase
- Defined in:
- lib/error_base.rb
Direct Known Subclasses
HTTPError::BadGateway, HTTPError::BadRequest, HTTPError::Conflict, HTTPError::ExpectationFailed, HTTPError::FailedDependency, HTTPError::Forbidden, HTTPError::GatewayTimeout, HTTPError::Gone, HTTPError::HTTPVersionNotSupported, HTTPError::InsufficientStorage, HTTPError::InternalServerError, HTTPError::LengthRequired, HTTPError::Locked, HTTPError::LoopDetected, HTTPError::MethodNotAllowed, HTTPError::MisdirectedRequest, HTTPError::NetworkAuthenticationRequired, HTTPError::NotAccpetable, HTTPError::NotExtended, HTTPError::NotFound, HTTPError::NotImplemented, HTTPError::PayloadTooLarge, HTTPError::PaymentRequired, HTTPError::PreconditionFailed, HTTPError::PreconditionRequired, HTTPError::ProxyAuthenticationRequired, HTTPError::RangeNotSatisfiable, HTTPError::RequestHeaderFieldsTooLarge, HTTPError::RequestTimeout, HTTPError::ServiceUnavailable, HTTPError::TooManyRequests, HTTPError::Unauthorized, HTTPError::UnavailableForLegalReasons, HTTPError::UnprocessableEntity, HTTPError::UnsupportedMediaType, HTTPError::UpgradeRequired, HTTPError::UriTooLong, HTTPError::VariantAlsoNegotiates
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(*message) ⇒ ErrorBase
constructor
A new instance of ErrorBase.
- #msg ⇒ Object
Constructor Details
#initialize(*message) ⇒ ErrorBase
Returns a new instance of ErrorBase.
2 3 4 5 6 7 |
# File 'lib/error_base.rb', line 2 def initialize( * ) = .join(' ') @_code = self.class::CODE @_msg = .empty? ? Rack::Utils::HTTP_STATUS_CODES[@_code] : end |
Instance Method Details
#code ⇒ Object
9 10 11 |
# File 'lib/error_base.rb', line 9 def code @_code end |
#msg ⇒ Object
13 14 15 |
# File 'lib/error_base.rb', line 13 def msg @_msg end |