mirror of
https://github.com/servo/servo.git
synced 2025-07-31 11:10:22 +01:00
Improve err msg when failing to output png
Before on at least Linux the following failure is hard to root cause: [~/servo] ./target/debug/servo -o tmp.png ./tests/html/lipsum.html thread '<main>' panicked at 'assertion failed: res.is_ok()', .../compositor.rs:1508 thread '<main>' panicked at 'You should have disposed of the pixmap...', .../rust-layers/.../surface.rs:166 Now: [~/servo] ./target/debug/servo -o tmp.png ./tests/html/lipsum.html thread '<main>' panicked at 'Error writing png: Permission denied (os error 13)', .../compositor.rs:1508 thread '<main>' panicked at 'You should have disposed of the pixmap properly with destroy()! This pixmap will leak!', .../rust-layers/.../surface.rs:166
This commit is contained in:
parent
4e69f301e1
commit
b7ea7de136
1 changed files with 1 additions and 1 deletions
|
@ -1505,7 +1505,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
let mut img = self.draw_png(framebuffer_ids, texture_ids, width, height);
|
||||
let path = opts::get().output_file.as_ref().unwrap();
|
||||
let res = png::store_png(&mut img, &path);
|
||||
assert!(res.is_ok());
|
||||
assert!(res.is_ok(), format!("Error writing png: {}", res.unwrap_err()));
|
||||
None
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue