CofheError objects on failure. This replaces the Result wrapper pattern used by cofhejs.
Catching errors
CofheError structure
EveryCofheError has:
code— aCofheErrorCodeenum value identifying the error typemessage— a human-readable description of what went wrong
isCofheError(err) to check if a caught error is a CofheError.