mirror of https://github.com/eyhc1/rendercv.git
cli: improve YAML error message
This commit is contained in:
parent
1f8c8a964c
commit
ded73f6415
|
@ -378,7 +378,11 @@ def handle_exceptions(function: Callable) -> Callable:
|
|||
except pydantic.ValidationError as e:
|
||||
handle_validation_error(e)
|
||||
except ruamel.yaml.YAMLError as e:
|
||||
error("There is a YAML error in the input file!", e)
|
||||
error(
|
||||
"There is a YAML error in the input file!\n\nTry to use quotation marks"
|
||||
" to make sure the YAML parser understands the field is a string.",
|
||||
e,
|
||||
)
|
||||
except FileNotFoundError as e:
|
||||
error(e)
|
||||
except UnicodeDecodeError as e:
|
||||
|
|
Loading…
Reference in New Issue