[WASM] improve error logging
Summary: Emscripten instead of errors returns to JS pointer to error. To get meaningful message we need to pass this pointer back to C++, read value from it and return error.what() as string.
Test Plan:
- Add this code auto x = SQLiteQueryExecutor::getStorage().get<Draft>("123"); and check if error from ORM is visible:
- Add this code throw std::runtime_error("TEST ERROR"); and check if error is visible:
- Use null pointer
- User not existing pointer
Reviewers: tomek, michal, marcin
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D10396