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

The engine doesn't throw an error if it has no name #32

Open
sebastienfilion opened this issue Nov 13, 2018 · 1 comment
Open

The engine doesn't throw an error if it has no name #32

sebastienfilion opened this issue Nov 13, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@sebastienfilion
Copy link
Collaborator

Trying to instantiate an engine without a name doesn't throw an error, but part of the initialization code expects the value to be set.

const $engine = new NucleusEngine();

This throws a Nucleus Datastore error NucleusError: The item must be a string.

The name should be mandatory and throw a clear error when omitted.

@sebastienfilion
Copy link
Collaborator Author

sebastienfilion commented Nov 15, 2018

The Nucleus Datastore has a default name (Undefined), this isn't a problem because the name are just used for debugging. In the case of the engine, it could become a problem to have a default name because the engine's main queue's name is the name of the engine...

So, if the user instantiate different engine named Undefined, all the action would be pushed to the Undefined queue and would cause a lot of confusion.

@sebastienfilion sebastienfilion added the bug Something isn't working label Nov 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant