summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Billy Messenger <BillyDM@tutamail.com>2021-07-22 13:08:13 -0500
committerLibravatar Billy Messenger <BillyDM@tutamail.com>2021-07-22 13:08:13 -0500
commita7d2834a6d15466eecca29bb6357d3539cb652cd (patch)
tree4cd74ac7fbde634e32b90704184296568e220aaf /examples
parent191288771f747f89e555dd315b424b468ab3d52a (diff)
downloadiced-a7d2834a6d15466eecca29bb6357d3539cb652cd.tar.gz
iced-a7d2834a6d15466eecca29bb6357d3539cb652cd.tar.bz2
iced-a7d2834a6d15466eecca29bb6357d3539cb652cd.zip
add custom error for Compositor::draw()
Diffstat (limited to 'examples')
-rw-r--r--examples/integration/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs
index ab0e2299..9ef31203 100644
--- a/examples/integration/src/main.rs
+++ b/examples/integration/src/main.rs
@@ -220,11 +220,13 @@ pub fn main() {
local_pool.run_until_stalled();
}
Err(error) => match error {
- wgpu::SwapChainError::Outdated => {
+ wgpu::SwapChainError::OutOfMemory => {
+ panic!("Swapchain error: {}. Rendering cannot continue.", error)
+ }
+ _ => {
// Try rendering again next frame.
window.request_redraw();
}
- _ => panic!("Swapchain error: {:?}", error),
},
}
}