-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve errors when an item no longer exists
If a user keeps a ref to an item, and that item disappears, calling a method on that item will now raise a helpful StaleProxyError, instead of a NoMethodError on nil The proxy code was significantly refactored, and Thing proxies will also inherit the same stale proxy handling. I also removed the $things registry lookup on every access of a thing, using the same event subscriber mechanism as Item. I also moved several methods from GenericItem to Item, so that Proxy can detect that those methods should exist even for dummy/stale items. Signed-off-by: Cody Cutrer <[email protected]>
- Loading branch information
Showing
12 changed files
with
364 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.