mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
In Context::handle_error_fatal, print cause chain. (#3563)
This commit is contained in:
@@ -126,6 +126,7 @@ By @teoxoy in [#3534](https://github.com/gfx-rs/wgpu/pull/3534)
|
||||
|
||||
- `copyTextureToTexture` src/dst aspects must both refer to all aspects of src/dst format. By @teoxoy in [#3431](https://github.com/gfx-rs/wgpu/pull/3431)
|
||||
- Validate before extracting texture selectors. By @teoxoy in [#3487](https://github.com/gfx-rs/wgpu/pull/3487)
|
||||
- Fix fatal errors (those which panic even if an error handler is set) not including all of the details. By @kpreid in [#3563](https://github.com/gfx-rs/wgpu/pull/3563)
|
||||
|
||||
#### Vulkan
|
||||
|
||||
|
||||
@@ -299,12 +299,13 @@ impl Context {
|
||||
self.handle_error(sink_mutex, cause, "", None, string)
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
fn handle_error_fatal(
|
||||
&self,
|
||||
cause: impl Error + Send + Sync + 'static,
|
||||
string: &'static str,
|
||||
operation: &'static str,
|
||||
) -> ! {
|
||||
panic!("Error in {string}: {cause}");
|
||||
panic!("Error in {operation}: {f}", f = self.format_error(&cause));
|
||||
}
|
||||
|
||||
fn format_error(&self, err: &(impl Error + 'static)) -> String {
|
||||
|
||||
Reference in New Issue
Block a user