This repository has been archived by the owner on Nov 10, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw HumanReadableException when initializing SQLite fails
Summary: Hopefully this is the last time I have to twiddle this error handling path... the existing solution had a couple minor irritations: (1) the failure showed up as a NoClassDefFound exception, which hides the real root cause, and (2) throwing it as a RuntimeException pollutes logging and the user's console. So, we'll tweak this slightly to use a synchronized static method instead of a static initializer, and throw a nice pretty HumanReadableException. Since most of the time this error is caused by not having space for the .so, I'll even suggest that the user may be low on disk space. Test Plan: mount buck-out/tmp on a tiny volume to trigger the error: ``` BUILD FAILED: Failed to initialize sqlite-jdbc. Is your disk full? ``` Reviewed By: dinhviethoa fbshipit-source-id: fa0ca96
- Loading branch information