api/internal: Remove set field from Error type.

This commit is contained in:
Justin M. Keyes
2017-04-23 19:58:13 +02:00
parent 62c3f436a9
commit 2ed91f222f
9 changed files with 26 additions and 23 deletions

View File

@@ -225,7 +225,7 @@ for i = 1, #functions do
end
output:write('\n')
output:write('\n if (args.size != '..#fn.parameters..') {')
output:write('\n _api_set_error(error, error->type, "Wrong number of arguments: expecting '..#fn.parameters..' but got %zu", args.size);')
output:write('\n _api_set_error(error, kErrorTypeException, "Wrong number of arguments: expecting '..#fn.parameters..' but got %zu", args.size);')
output:write('\n goto cleanup;')
output:write('\n }\n')
@@ -250,7 +250,7 @@ for i = 1, #functions do
output:write('\n '..converted..' = (handle_T)args.items['..(j - 1)..'].data.integer;')
end
output:write('\n } else {')
output:write('\n _api_set_error(error, error->type, "Wrong type for argument '..j..', expecting '..param[1]..'");')
output:write('\n _api_set_error(error, kErrorTypeException, "Wrong type for argument '..j..', expecting '..param[1]..'");')
output:write('\n goto cleanup;')
output:write('\n }\n')
else
@@ -290,7 +290,7 @@ for i = 1, #functions do
output:write('error);\n')
end
-- and check for the error
output:write('\n if (error->set) {')
output:write('\n if (ERROR_SET(error)) {')
output:write('\n goto cleanup;')
output:write('\n }\n')
else