Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug : AlreadyPassivate and ComponentNotFound errors are raised during a ComponentManager>>cleanUp #14

Closed
labordep opened this issue Dec 21, 2020 · 0 comments

Comments

@labordep
Copy link
Member

labordep commented Dec 21, 2020

Because of components are cleanup in a random order, component not found exceptions appears. Ignore theres errors during a cleanUp.

Code proposition for ComponentManager class :

cleanUp
	<script: 'self cleanUp'>
	| notifiers subscribers |

	"CleanUp and initialize the ComponentFactory"
	MolComponentFactory cleanUp.
	MolComponentFactory initialize.
	
	Default ifNil:[^self].
	Default locatorServices eventsSubscribers: nil.

	notifiers := MolEventNotifier allInstances.
	subscribers := MolEventSubscriber allInstances.

	"Ignore some Error during the cleanUp because the clean process can be different of the start order"
	[Default release] on: ComponentAlreadyPassivatedError, ComponentNotFoundError do:[ :e | "do nothing" ].

	Default := nil.
	notifiers do: [:n | n release].
	subscribers do: [:n | n release].
@labordep labordep changed the title Bug : Cannot cleanUp with a started Component Tree Bug : AlreadyPassivate and ComponentNotFound errors are raised during a ComponentManager>>cleanUp Dec 23, 2020
labordep added a commit that referenced this issue Dec 24, 2020
Add some errors to have a better processing of errors.
Add some tests.
Fix issue #14. 
Fix issue #17. 
Fix issue #18.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant