Problem
RenderCVUserError, RenderCVUserValidationError, and RenderCVInternalError in src/rendercv/exception.py are decorated with @dataclass and inherit from ValueError/RuntimeError. When raised with the keyword form actually used throughout the codebase (e.g. RenderCVUserError(message=...)), str(exc) returns '' and exc.args is () because dataclass-generated __init__ never calls super().__init__(message).
Steps
from rendercv.exception import RenderCVUserError
try:
raise RenderCVUserError(message='YAML file not found')
except RenderCVUserError as e:
print(repr(e.args), repr(str(e)))
Expected
('YAML file not found',) 'YAML file not found'
Actual
() ''
Any path where these exceptions escape the handle_user_errors decorator (library use, uncaught bubbling, third-party logging) shows a nameless RenderCVUserError in the traceback with no message. Real call sites use kw form: src/rendercv/cli/render_command/run_rendercv.py:188,196.
Environment
rendercv 2.8 (pyproject.toml), Python >=3.12. File: src/rendercv/exception.py:40-70.
Fix sketch
Add __post_init__ calling super().__init__(self.message), or drop @dataclass and use plain __init__.
Thanks for maintaining rendercv/rendercv!
Problem
RenderCVUserError,RenderCVUserValidationError, andRenderCVInternalErrorinsrc/rendercv/exception.pyare decorated with@dataclassand inherit fromValueError/RuntimeError. When raised with the keyword form actually used throughout the codebase (e.g.RenderCVUserError(message=...)),str(exc)returns''andexc.argsis()because dataclass-generated__init__never callssuper().__init__(message).Steps
Expected
('YAML file not found',) 'YAML file not found'Actual
() ''Any path where these exceptions escape the
handle_user_errorsdecorator (library use, uncaught bubbling, third-party logging) shows a namelessRenderCVUserErrorin the traceback with no message. Real call sites use kw form:src/rendercv/cli/render_command/run_rendercv.py:188,196.Environment
rendercv 2.8 (
pyproject.toml), Python >=3.12. File:src/rendercv/exception.py:40-70.Fix sketch
Add
__post_init__callingsuper().__init__(self.message), or drop@dataclassand use plain__init__.Thanks for maintaining rendercv/rendercv!