-
Notifications
You must be signed in to change notification settings - Fork 132
feat: enhance error handling with color support and additional notes in exceptions. #3964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…in exceptions. Adding stdout and stderr in MapdlDidntstart exception. Also refactor by removing unnecesary code.
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
🧙 Sourcery has finished reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @germa89 - I've reviewed your changes - here's some feedback:
- Refactor color_text to accept a bcolors enum (or validate string keys) instead of raw strings to prevent KeyError at runtime.
- DRY up the duplicated str logic by having MapdlDidNotStart call super().str and then append its additional stdout/stderr/notes instead of reimplementing the entire method.
- In retrieve_mapdl_from_args, prefer using isinstance checks or a shared protocol rather than matching on class.name for more reliable type detection.
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3964 +/- ##
==========================================
+ Coverage 88.28% 88.30% +0.02%
==========================================
Files 187 187
Lines 14906 14935 +29
==========================================
+ Hits 13160 13189 +29
Misses 1746 1746 🚀 New features to boost your workflow:
|
@pyansys-ci-bot LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
As the title and adding stdout and stderr attributes in MapdlDidntstart exception.
Also refactor by removing unnecesary code.
Issue linked
NA
Checklist
draft
if it is not ready to be reviewed yet.feat: adding new MAPDL command
)Summary by Sourcery
Enhance exception handling with ANSI color support, additional notes and output details, and streamline exception class definitions
New Features:
Enhancements: