Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Dec 17, 2021
1 parent 8d51d10 commit 9d962ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/compute/shader.wgsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[block]]
struct PrimeIndices {
data: [[stride(4)]] array<u32>;
}; // this is used as both input and output for convenience
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ impl OwnedLabel {
}

#[track_caller]
pub fn check_error<I, E: std::fmt::Debug>(input: (I, Option<E>)) -> I {
pub fn check_error<I, E: std::error::Error>(input: (I, Option<E>)) -> I {
if let Some(error) = input.1 {
panic!("{:?}", error);
panic!("{}", error);
}

input.0
Expand Down

0 comments on commit 9d962ef

Please sign in to comment.