Error handling overhaul

This commit is contained in:
Pablo Ariel Mayobre 2023-02-14 18:14:24 -03:00 committed by Pablo Mayobre
parent d854e93e70
commit c5c056f566
No known key found for this signature in database
GPG key ID: 13A2F589D013E0E7
6 changed files with 57 additions and 28 deletions

View file

@ -50,7 +50,7 @@ System.mt = {
function System.new(definition)
for name, def in pairs(definition) do
if type(name) ~= 'string' then
error("invalid name for filter (string key expected, got "..type(name)..")", 2)
Utils.error(2, "invalid name for filter (string key expected, got %s)", type(name))
end
Filter.validate(name, def)