cli: cleaner error handling
This commit is contained in:
@@ -79,11 +79,7 @@ class ServiceCreator:
|
||||
registry_old.write_to_config()
|
||||
hla_names_old.write_to_config()
|
||||
switch_branch(repo, original_branch)
|
||||
|
||||
if isinstance(e, UVError):
|
||||
pass
|
||||
else:
|
||||
raise e
|
||||
raise e
|
||||
|
||||
def _render_new_service_templates(
|
||||
self,
|
||||
@@ -131,12 +127,9 @@ class ServiceCreator:
|
||||
logger.warning(result.stderr.strip())
|
||||
|
||||
except FileNotFoundError as e:
|
||||
logger.error(
|
||||
"The 'uv' command-line tool is not installed or not in your PATH.",
|
||||
)
|
||||
raise UVError from e
|
||||
raise UVError("The 'uv' command-line tool is not installed or not in your PATH.") from e
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.error("'uv lock' failed to execute successfully.")
|
||||
logger.error(f"Exit Code: {e.returncode}")
|
||||
logger.error(f"Details:\n{e.stderr}")
|
||||
raise UVError from e
|
||||
raise UVError(e.stderr) from e
|
||||
|
||||
Reference in New Issue
Block a user