Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Privatize unneededly protected methods in Active Support | Akira Matsuda | 2016-12-24 | 1 | -1/+1 |
| | |||||
* | Refactor the handling of fallback exception handlers | Sean Griffin | 2016-11-17 | 1 | -10/+5 |
| | |||||
* | Call fallback exception handlers with the right exception | Sean Griffin | 2016-11-17 | 1 | -3/+10 |
| | | | | | | | | The issue presented in #26246 showed a deeper underlying problem. When we fell back to the exception handler for an exceptions cause, we were calling that handler with the outer raised exception. This breaks the calling code's expectations, especially if the exception has methods on it behond those from `StandardError`. | ||||
* | Add missing `+` around a some literals. | bogdanvlviv | 2016-10-27 | 1 | -2/+2 |
| | | | | | | Mainly around `nil` [ci skip] | ||||
* | applies new string literal convention in activesupport/lib | Xavier Noria | 2016-08-06 | 1 | -4/+4 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Action Mailer: Declarative exception handling with `rescue_from`. | Jeremy Daer | 2016-05-15 | 1 | -53/+89 |
| | | | | | | | | | | | | | | | | | | | | | | | Follows the same pattern as controllers and jobs. Exceptions raised in delivery jobs (enqueued by `#deliver_later`) are also delegated to the mailer's rescue_from handlers, so you can handle the DeserializationError raised by delivery jobs: ```ruby class MyMailer < ApplicationMailer rescue_from ActiveJob::DeserializationError do … end ``` ActiveSupport::Rescuable polish: * Add the `rescue_with_handler` class method so exceptions may be handled at the class level without requiring an instance. * Rationalize `exception.cause` handling. If no handler matches the exception, fall back to the handler that matches its cause. * Handle exceptions raised elsewhere. Pass `object: …` to execute the `rescue_from` handler (e.g. a method call or a block to instance_exec) against a different object. Defaults to `self`. | ||||
* | Use the most highest priority exception handler when cause is set | Sean Griffin | 2016-03-11 | 1 | -0/+10 |
| | | | | | | | | | | | | There was some subtle breakage caused by #18774, when we removed `#original_exception` in favor of `#cause`. However, `#cause` is automatically set by Ruby when raising an exception from a rescue block. With this change, we will use whichever handler has the highest priority (whichever call to `rescue_from` came last). In cases where the outer has lower precidence than the cause, but the outer is what should be handled, cause will need to be explicitly unset. Fixes #23925 | ||||
* | [ci skip] Update ActiveSupport::Rails and ActiveSupport::Rescuable docs | DAVID MOORE | 2015-04-26 | 1 | -1/+1 |
| | | | | [Dave Moore] | ||||
* | Wrap inline rescue with or-equal calls | Robin Dupret | 2015-03-02 | 1 | -1/+1 |
| | | | | | At the moment, `rescue_from` doesn't work with strings on Rubinius because of rubinius/rubinius#3272. | ||||
* | Add class level case operator support for error dispatching in Rescuable | Genadi Samokovarov | 2014-12-10 | 1 | -2/+2 |
| | |||||
* | Remove deprecated `Proc#bind` with no replacement. | Carlos Antonio da Silva | 2013-07-01 | 1 | -1/+0 |
| | |||||
* | update some AS code examples to 1.9 hash syntax [ci skip] | Francesco Rodriguez | 2012-09-12 | 1 | -3/+3 |
| | |||||
* | Document exception handling inside resce_from handlers | twinturbo | 2012-04-28 | 1 | -0/+1 |
| | |||||
* | removed warning: shadowing outer local variable - exception | Arun Agrawal | 2012-03-24 | 1 | -1/+1 |
| | |||||
* | Fix tests, when creating rescue handler, we need to check for arity now | Piotr Sarnacki | 2012-03-23 | 1 | -1/+5 |
| | | | | | | Before it was handled by Proc.bind, but since Proc.bind has been deprecated, this is no longer the case and returned handler needs to match rescuer. | ||||
* | deprecate Proc#bind that can cause symbol memory leak | Sergey Nartimov | 2012-03-22 | 1 | -1/+1 |
| | |||||
* | Whitespace and example identation | Josep M. Bach | 2010-08-15 | 1 | -0/+1 |
| | |||||
* | add missing requires to Rescuable and RouteSet [#4415 state:committed] | Mislav Marohnić | 2010-04-16 | 1 | -0/+1 |
| | | | | Signed-off-by: Xavier Noria <fxn@hashref.com> | ||||
* | Convert to class_attribute | Jeremy Kemper | 2010-02-01 | 1 | -4/+4 |
| | |||||
* | rescuable.rb needs active_support/core_ext/array/extract_options | Xavier Noria | 2010-01-01 | 1 | -0/+1 |
| | |||||
* | rescuable.rb needs active_support/core_ext/string/inflections because it ↵ | Xavier Noria | 2010-01-01 | 1 | -0/+1 |
| | | | | uses constantize | ||||
* | Rescue handlers should never need array wrapping. Bug if so. | Jeremy Kemper | 2009-11-13 | 1 | -2/+1 |
| | |||||
* | Prefer Array.wrap to Array() | Jeremy Kemper | 2009-11-13 | 1 | -1/+2 |
| | |||||
* | Extend Callbacks and Rescuable with AS concern | Joshua Peek | 2009-10-13 | 1 | -4/+4 |
| | |||||
* | Explicit dependency on Proc#bind extension | Jeremy Kemper | 2009-03-28 | 1 | -0/+1 |
| | |||||
* | Explicit dependency on class_inheritable_accessor | Jeremy Kemper | 2009-03-24 | 1 | -0/+2 |
| | |||||
* | Don't shadow local with black arg | Jeremy Kemper | 2008-11-07 | 1 | -4/+4 |
| | |||||
* | Add tests for ActiveSupport::Rescuable. Use ActiveSupport::Rescuable in ↵ | Pratik Naik | 2008-10-04 | 1 | -20/+54 |
| | | | | ActionController::Base. | ||||
* | First draft of ActiveSupport::Rescuable | Norbert Crombach | 2008-10-04 | 1 | -0/+74 |
Signed-off-by: Pratik Naik <pratiknaik@gmail.com> |