From 2c33601a76f53c3845b66b8b2cddb0857267ba31 Mon Sep 17 00:00:00 2001 From: Michal Ochman Date: Tue, 2 Nov 2021 11:41:27 +0100 Subject: [PATCH] Update README.md part about handling exceptions A small change in README.md which makes a part about exception swallowing more precise. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6de00f2..8d11cd1 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ context.success? # => false Normally, however, these exceptions are not seen. In the recommended usage, the controller invokes the interactor using the class method `call`, then checks the `success?` method of the context. -This works because the `call` class method swallows exceptions. When unit testing an interactor, if calling custom business logic methods directly and bypassing `call`, be aware that `fail!` will generate such exceptions. +This works because the `call` class method swallows `Interactor::Failure` exceptions. When unit testing an interactor, if calling custom business logic methods directly and bypassing `call`, be aware that `fail!` will generate such exceptions. See *Interactors in the Controller*, below, for the recommended usage of `call` and `success?`.