modio-sdk-legacy
modio-sdk-legacy copied to clipboard
modioInit should return error on failure
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
modioInitand return true/false appropriately (will need an explicit::initfor C++) - If the logger failed, log errors to stderr instead.
As a follow up from our chat on discord, it looks the best option so far is:
- Separate the init from the constructor on C++
- Return a bool modio was initialised flag on the init method
- In case mod.io could not initialize output a message via stderr