Module: Rester::Errors
- Defined in:
- lib/rester/errors.rb
Defined Under Namespace
Classes: AdapterError, AuthenticationError, CircuitOpenError, ClientError, ConnectionError, Error, ForbiddenError, HttpError, MethodDefinitionError, MethodError, NotFoundError, RSpecError, RequestError, ServerError, StubError, TestError, TimeoutError, ValidationError
Class Method Summary collapse
-
.throw_error!(error, message = nil) ⇒ Object
Throws an error instead of raising it, which is more performant.
Class Method Details
.throw_error!(error, message = nil) ⇒ Object
Throws an error instead of raising it, which is more performant. Must be caught by an appropriate error handling wrapper.
7 8 9 10 |
# File 'lib/rester/errors.rb', line 7 def throw_error!(error, = nil) error = error.new() if error.is_a?(Class) throw :error, error end |