Error handling overhaul

This commit is contained in:
Pablo Ariel Mayobre 2021-01-17 16:12:22 -03:00
parent 8d1237f574
commit 0b1e26624a
No known key found for this signature in database
GPG key ID: 5ACD9E6858BEB0A9
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)