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

Error if module was not set up. #63

Open
stelcheck opened this issue Aug 18, 2017 · 0 comments · May be fixed by #64
Open

Error if module was not set up. #63

stelcheck opened this issue Aug 18, 2017 · 0 comments · May be fixed by #64

Comments

@stelcheck
Copy link
Member

stelcheck commented Aug 18, 2017

Ref: https://github.com/mage/mage-sdk-unity/blob/develop/Mage/Module.cs#L86

Description

When attempting to make a call to a module which was not set up, you get a null error.

Desired behavior

Modules are singletons; they should have a protected field that tracks if the module was initialized, and calls should error out early if:

  1. The module has not been initialized
  2. If we attempt to execute a user command that is not defined in the module

cc @nullorvoid @AlmirKadric

stelcheck added a commit to stelcheck/mage-sdk-unity that referenced this issue Aug 18, 2017
  - Transform CommandPrefix and Commands into abstracts; this should
    help provide a more comprehensive experience to newcomers
  - Track whether a module was setup or not, and throw an exception
    when you try to call a command on a non-setup module
  - Throw an exception if a user command is not found

Fixes mage#63
@stelcheck stelcheck linked a pull request Aug 18, 2017 that will close this issue
stelcheck added a commit to stelcheck/mage-sdk-unity that referenced this issue Aug 21, 2017
  - Transform CommandPrefix and Commands into abstracts; this should
    help provide a more comprehensive experience to newcomers
  - Track whether a module was setup or not, and throw an exception
    when you try to call a command on a non-setup module
  - Throw an exception if a user command is not found

Fixes mage#63
stelcheck added a commit to stelcheck/mage-sdk-unity that referenced this issue Aug 22, 2017
  - Transform CommandPrefix and Commands into abstracts; this should
    help provide a more comprehensive experience to newcomers
  - Track whether a module was setup or not, and throw an exception
    when you try to call a command on a non-setup module
  - Throw an exception if a user command is not found

Fixes mage#63
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

Successfully merging a pull request may close this issue.

1 participant