Comparison

util/error.lua @ 11223:b8589256b404

util.error: Expose is_error on registry objects for convenience
author Matthew Wild <mwild1@gmail.com>
date Wed, 09 Dec 2020 14:00:13 +0000
parent 11222:4b39691a274e
child 11224:8143fd2f138b
comparison
equal deleted inserted replaced
11222:4b39691a274e 11223:b8589256b404
121 return ok, err, ...; 121 return ok, err, ...;
122 end 122 end
123 return nil, wrap(err); 123 return nil, wrap(err);
124 end; 124 end;
125 wrap = wrap; 125 wrap = wrap;
126 is_error = is_error;
126 }; 127 };
127 end 128 end
128 129
129 local function coerce(ok, err, ...) 130 local function coerce(ok, err, ...)
130 if ok or is_error(err) then 131 if ok or is_error(err) then