Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

modioInit should return error on failure #102

Open
SupSuper opened this issue Aug 20, 2019 · 1 comment
Open

modioInit should return error on failure #102

SupSuper opened this issue Aug 20, 2019 · 1 comment

Comments

@SupSuper
Copy link
Contributor

SupSuper commented Aug 20, 2019

Currently if there's an error in modioInit due to an invalid parameter (eg. invalid root path, no write permissions, etc) the SDK just fails silently since nothing is logged and any web requests will just respond normally.

  • Check for errors in modioInit and return true/false appropriately (will need an explicit ::init for C++)
  • If the logger failed, log errors to stderr instead.
@Turupawn
Copy link
Contributor

As a follow up from our chat on discord, it looks the best option so far is:

  1. Separate the init from the constructor on C++
  2. Return a bool modio was initialised flag on the init method
  3. In case mod.io could not initialize output a message via stderr

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants