bindings for error logging, phase 1.
better error reporting for json parse errors.