Open
Description
Open questions:
- Does beforeTask throwing end the zone? or just prevent the immediate task from running?
- Not exiting Zone with error may lead to some functions silently not running and no error being reported. (@see https://github.com/strongloop/zone/blob/feature/BeforeAfterTaskHooks/tests/BeforeAfterTaskTest.js#L22)
- Zone lib provides beforeTask & afterTask as hooks that be defined when creating the zone. Does the
+
and-
sugar form zone.js make sense to add here? - Zones in this lib are independent and carry their own hooks rather than inherit from parent. Users have be explicit about what hooks to run. What is the use-case where inheritance is useful?
- Assume the following
RootZone
Zone1
|-EventEmitter
+-Zone2
+-Zone3
+-listener
When I emit from zone1, would before/after be executed only on zone3 or on zone2 as well?