)
end
+function validator_error( option, message )
+ return string.format(
+ 'External validator in option "%s" failed:\n%s',
+ option:cid(), message or "Unknown error"
+ )
+end
+
+function scheme_error( scheme, message )
+ return string.format(
+ 'Error while loading scheme "%s":\n%s',
+ scheme, message:gsub("^.-:.-: ","")
+ )
+end
+
function dump_dependency( dep, ref, v, e )
local str = nil
str = string.format(
'%s) failed:\n\t%s',
- str, e or string.format(
+ str, e and e:gsub("\n","\n\t") or string.format(
'Option "%s" %s',
table.concat( ref, "." ), (
type(v) == "boolean"
return str
end
+
+function id( c, s, o )
+ if type(c) == "table" then
+ c, s, o = unpack(c)
+ end
+
+ return c .. ( s and '.' .. s or '' ) .. ( o and '.' .. o or '' )
+end