Tags: stuartsierra/component
Tags
Throw if component's Lifecycle method returns nil It is a common mistake for component Lifecycle methods (start and stop) to return nil instead of the updated component instance. These archived commits check for a returned nil when updating a system and throw an exception. This prevents potential legitimate use cases for component function returning nil. Instead, commit fb89150 changes the error message when a component is discovered to be nil in the system map. This error message points users in the right direction without preventing a component from returning nil if that's what it needs to do. See #17 for further discussion.
PreviousNext