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

Zealous Exception handling during (reset || remove) #18

Closed
mgan59 opened this issue Jan 27, 2014 · 0 comments
Closed

Zealous Exception handling during (reset || remove) #18

mgan59 opened this issue Jan 27, 2014 · 0 comments
Labels

Comments

@mgan59
Copy link
Owner

mgan59 commented Jan 27, 2014

When using the --reset or --remove flags from CLI a missing collection in mongodb will cause the process to terminate and throw an error. This was the result of previous adjustments to improve error handling/messaging.

The problem with the zealous exception handling is it blocks the --reset from continuing if a single removal fails, leaving the mongodb data in an undetermined state at the point of exception. This isn't ideal at all especially in cases where several fixtures can share the same collection resulting it dumping the collection and on subsequent processing the collection no longer exists resulting in an exception. Furthermore, a misnamed collection name could hold up an othewise functioning fixture set during reset.

Fix currently is to warn on stdout which collection failed to remove and to propagate the execution stack.

mgan59 added a commit that referenced this issue Jan 27, 2014
mgan59 added a commit that referenced this issue Jan 27, 2014
@mgan59 mgan59 closed this as completed Jan 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant