mozilla / mentat

UNMAINTAINED A persistent, relational store inspired by Datomic and DataScript.
https://mozilla.github.io/mentat/
Apache License 2.0
1.65k stars 115 forks source link

FFI's store_open should return an ExternResult, instead of crashing on error #722

Open grigoryk opened 6 years ago

grigoryk commented 6 years ago

Crashing on open errors is obviously bad, and we should provide a nicer experience. Besides the myriad of "failed to open db" scenarios, the most common error while working with mentat SDK might be trying to open an invalid path. Crashing obscures the actual problem behind an opaque stacktrace.

See #710 as it would likely be a requirement here.