feat(ndk): expose init return code by hannojg · Pull Request #1430 · getsentry/sentry-native
But yeah, interestingly i think these ENSURE_OR_FAIL calls will currently go as silent errors (as it doesn't throw or log or return an error code)
| ENSURE_OR_FAIL(outbox_path); | |
| transport = sentry_transport_new(send_envelope); | |
| ENSURE_OR_FAIL(transport); |
With this change its also sub-optimal, since the developer might turn on debug logging, check their logs but doesn't get any valuable information from it.
I am actually wondering why we are doing that checking here, given that sentry_core.c already seems to do the same checking + provide proper error logging:
| if (sentry__path_create_dir_all(options->database_path)) { | |
| SENTRY_WARN("failed to create database directory or there is no write " | |
| "access to this directory"); | |
| goto fail; | |
| } |
?
// Edit: okay i don't know if sentry__path_create_dir_all would crash with an invalid string, so potentially we'd want to either throw or also log warnings here?