Escape exception string when generating error message JSON
Throw exception if parsing of ffi type or abi fails