Skip to content
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

avoid stackoverflow when passing two types that can not be promoted to a matching types in mean_hue #566

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KristofferC
Copy link
Member

The test at

@test_throws Exception mean_hue(RGB(0.1, 0.2, 0.3), RGB(0.4, 0.5, 0.6))
runs a function that stack overflows. Continuing the process after a stack overflow is not recommended and julia 1.12 prints:

Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.

Instead, catch if we have no match after the promote and throw a normal error.

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.75%. Comparing base (4664eb9) to head (68c8bcf).
Report is 12 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #566   +/-   ##
=======================================
  Coverage   96.75%   96.75%           
=======================================
  Files           9        9           
  Lines        1295     1296    +1     
=======================================
+ Hits         1253     1254    +1     
  Misses         42       42           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant