mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-12 11:42:13 -04:00
Improve File error handling. Massive effects...
API is somewhat stolen from Rust std::fs::File. Static factories didn't work out so well, though. Move semantics made my head explode. TODO: Still a lot of places where errors aren't handled, but it's an improvement...
This commit is contained in:
parent
d905c446bf
commit
682a1706a3
18 changed files with 328 additions and 235 deletions
|
@ -86,7 +86,11 @@ void SystemStatusView::on_camera() {
|
|||
return;
|
||||
}
|
||||
|
||||
PNGWriter png { filename_stem + ".PNG" };
|
||||
PNGWriter png;
|
||||
auto create_error = png.create(filename_stem + ".PNG");
|
||||
if( create_error.is_valid() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i=0; i<320; i++) {
|
||||
std::array<ColorRGB888, 240> row;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue