← Back to issue list

catkin, rosdep: stop using FileNotFoundErrors

View original Github issue

Metadata

Project
snapcraft
Number
#2270
Type
pull request
State
merged
Author
kyrofa
Labels
Created
Updated
Closed

Current evaluation

Merged. Replaces FileNotFoundError with SnapcraftError-derived exceptions in catkin and rosdep to prevent raw tracebacks from reaching Sentry. Ensures users receive formatted error messages. Approved by one reviewer and passed CI.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? ----- Using non-`SnapcraftError`s results in tracebacks being sent to Sentry instead of nice error messages. Fix this by introducing `SnapcraftError`-derived exceptions for these cases instead of using `FileNotFoundError`s.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Replaces FileNotFoundError with SnapcraftError-derived exceptions in catkin and rosdep to prevent raw tracebacks from reaching Sentry. Ensures users receive formatted error messages. Approved by one reviewer and passed CI.
qwen3.6-35b-a3b-mtp-q6 Merged. Replaced FileNotFoundError with SnapcraftError-derived exceptions in catkin and rosdep modules to prevent raw tracebacks from being sent to Sentry and ensure user-friendly error messages.
qwen3.6-35b-a3b-mtp-q6 Merged. Replaced FileNotFoundError usage in catkin and rosdep modules with SnapcraftError-derived exceptions to prevent raw tracebacks from being sent to Sentry and ensure proper error messages.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2255 catkin plugin: use SnapcraftException snapcraft merged Merged update to the catkin plugin replacing built-in exceptions with SnapcraftException. Resolves Launchpad bug #1791743 and aligns error handling with Sentry integration practices.
73%
#2965 rosdep: include EOL ROS distros snapcraft merged Merged changes enabling snapcraft to build for end-of-life ROS distributions by adding a deprecation warning instead of failing. Approved and passed CI.
71%
#1499 repo: make errors based on SnapcraftError snapcraft merged Merged a fix preventing repo-based errors from triggering tracebacks outside debug mode by inheriting from SnapcraftError. Approved by two reviewers, passed CI, and resolves an oversight from PR #1436.
71%
#2833 catkin: remove rospack workaround snapcraft merged Merged removal of a catkin rospack workaround, reverting #2585 as rosdep now natively ignores source packages. Approved by three reviewers and passed CI checks.
70%