templates can now raise
exceptions.
This commit is contained in:
parent
00dc153121
commit
8d5839724b
@ -116,10 +116,11 @@ class GenConfig::Context
|
||||
end
|
||||
end
|
||||
|
||||
#options["port"] = Crinja.function do
|
||||
# service = (arguments.varargs[0]? || "").to_s.gsub /\//, ':'
|
||||
# `get-port #{service}`.chomp
|
||||
#end
|
||||
options["raise"] = Crinja.function do
|
||||
message = arguments.varargs.join "\n"
|
||||
|
||||
raise Service::Exception.new "template error: #{message}"
|
||||
end
|
||||
|
||||
# FIXME: Move this to a separate binary?
|
||||
options["random_password"] = Crinja.function do
|
||||
|
Loading…
Reference in New Issue
Block a user