NVIDIA / warp

A Python framework for high performance GPU simulation and graphics
https://nvidia.github.io/warp/
Other
4.28k stars 243 forks source link

Replace more generic ValueError with specific FileNotFoundError for warp.sim.load_mesh #291

Closed steinraf closed 3 months ago

steinraf commented 3 months ago

Category

Description

Changing the error type of the warp.sim.load_mesh function for files which don't exist makes it easier to differentiate between wrong paths and invalid meshes programmatically.

Example: Iterating over multiple directories to find a mesh with a given name.

Changelog

Changes raise ValueError(f"File not found: {filename}") to raise FileNotFoundError(f"File not found: {filename}")

Before your PR is "Ready for review"

shi-eric commented 3 months ago

Thanks for opening this PR!