modio / modio-sdk-legacy

SDK for integrating mod.io into your game - a modding API for game developers
https://sdk.mod.io
MIT License
81 stars 27 forks source link

modioInit should return error on failure #102

Open SupSuper opened 5 years ago

SupSuper commented 5 years ago

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.

Turupawn commented 5 years ago

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