Comments (1)
Unfortunately I do not think this bug can be solved within Bread::Board.
The issue is that both the WithDependencies and WithParameters roles register some callbacks to happen 'after' the call to ->get (which happens deep within the call to ->resolve). While I can catch the exception within the BlockInjection::get, which would allow the 'after' hooks to get called, I cannot also propagate the exception to the user's code from there.
Basically, a service is expected to handle it's own exceptions, which is a little unfortunate, but is much better then trying to make Bread::Board handle it sensibly for all cases.
If you have any better ideas, I am willing to discuss, but I think the issue here is really just to wrap your block service in an eval and deal with the exception yourself.
Sorry.
from breadboard.
Related Issues (18)
- MX_PARAMS_VALIDATE_ALLOW_EXTRA => 1, HOT 4
- RFC: Add a service injector for service "currying" HOT 2
- Add an equivalent to dep(value => ...) to Bread::Board HOT 3
- Document parameterized container names HOT 4
- The "Null" lifecycle feels like a hack HOT 1
- Singleton::WithParameters does not lock HOT 1
- SetterInjection has hard-coded constructor name HOT 2
- Questions about depsolving, locks, parameters, singletons HOT 1
- CPAN Pull Request Challenge - June 2015 HOT 2
- Add abstract to modules
- Dist::Zilla dependency issues - Dist::Zilla::Plugin::Test::ReportPrereqs HOT 4
- Cannot have optional parameters HOT 2
- Calling container() inside another container() call can lead to odd results HOT 1
- The parameterized Log::Dispatch example does not work as written
- Make it possible to track whether a service has been instantiated? HOT 1
- Modifiers not visible under objects from services HOT 3
- #53 breaks backwards-compat HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from breadboard.