httpcaddyfile: Improve unrecognized directive errors

This commit is contained in:
Matthew Holt 2021-08-18 15:32:35 -06:00
parent f70a7578fa
commit bfbc459c0a
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -329,7 +329,7 @@ func parseSegmentAsConfig(h Helper) ([]ConfigValue, error) {
dir := seg.Directive()
dirFunc, ok := registeredDirectives[dir]
if !ok {
return nil, h.Errf("unrecognized directive: %s", dir)
return nil, h.Errf("unrecognized directive: %s - are you sure your Caddyfile structure (nesting and braces) is correct?", dir)
}
subHelper := h