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

F3DColorMapTools::Find does not handle filesystem error correctly #1843

Open
mwestphal opened this issue Dec 28, 2024 · 0 comments
Open

F3DColorMapTools::Find does not handle filesystem error correctly #1843

mwestphal opened this issue Dec 28, 2024 · 0 comments
Assignees
Labels
type:bug Something isn't working

Comments

@mwestphal
Copy link
Contributor

mwestphal commented Dec 28, 2024

Describe the bug
F3DColorMapTools::Find, used to find colormaps is not handling filesystem errors as it should, which can cause issues and unexpected exceptions, eg:

To Reproduce
Steps to reproduce the behavior:

  1. Open the file using f3d --colormap-file=folderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolderfolder/file.png
  2. catch all triggered

Expected behavior
Better error reporting

System Information:

  • OS: Any

F3D Information
Paste the content of f3d --version: 2.5.1 and master

Suggested solution
Adding a try catch around the filesystem usage is a possible solution, but some refactor of the method could be considered.

** Notes **

Same can be said about F3DStarter::SaveScreenshot

@mwestphal mwestphal added this to F3D Dec 28, 2024
@mwestphal mwestphal added type:bug Something isn't working good first issue Good for newcomers help wanted Please help with this issue! labels Dec 28, 2024
@mwestphal mwestphal moved this to To do in F3D Dec 28, 2024
@mwestphal mwestphal self-assigned this Dec 28, 2024
@mwestphal mwestphal removed good first issue Good for newcomers help wanted Please help with this issue! labels Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

1 participant