1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-12 10:55:20 +02:00

type error: avoid message Error: <nil> (#1918)

This commit is contained in:
Oliver Nocon 2020-08-12 15:41:29 +02:00 committed by GitHub
parent 173b453d84
commit c6ffb23fdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,7 +259,7 @@ func checkTypes(config map[string]interface{}, options interface{}) map[string]i
typeError = fmt.Errorf("config value for '%s' is of unexpected type %s, expected %s: %w",
paramName, paramValueType.Kind(), optionsField.Type.Kind(), typeError)
log.SetErrorCategory(log.ErrorConfiguration)
log.Entry().WithError(typeError).Fatal()
log.Entry().WithError(typeError).Fatal("type error in configuration")
}
}
return config