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

Detailed errors for include_file! #1339

Merged
merged 3 commits into from
Feb 17, 2023
Merged

Detailed errors for include_file! #1339

merged 3 commits into from
Feb 17, 2023

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Feb 17, 2023

Fixes #1322.

Before:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: No such file or directory (os error 2)', crates/re_renderer/src/renderer/mesh_renderer.rs:286:25
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/result.rs:1791:5
   3: core::result::Result<T,E>::unwrap
[...]

After:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: include_file!(../../shader/instanced_mesh.wgsl) (rooted at "crates/re_renderer/src/renderer/mesh_renderer.rs") failed while trying to import physical path "crates/re_renderer/src/renderer/../../shader/instanced_mesh.wgsl"

Caused by:
    No such file or directory (os error 2)', crates/re_renderer/src/renderer/mesh_renderer.rs:286:25
stack backtrace:
   0: rust_begin_unwind
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
[...]

@teh-cmc teh-cmc changed the title Cmc/include file errors Detailed errors for include_file! Feb 17, 2023
@teh-cmc teh-cmc added 🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself labels Feb 17, 2023
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@Wumpf Wumpf merged commit 09d9d68 into main Feb 17, 2023
@Wumpf Wumpf deleted the cmc/include_file_errors branch February 17, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

include_file!() must show the full path and its kind in case of error
2 participants