ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

Make loading files more error resistant #144

Closed ivoflipse closed 10 years ago

ivoflipse commented 10 years ago

I tried loading files from a folder with desktop.ini files, which it tried to read and (logically) failed to do. It should log a message, but for the rest keep going and not break completely.

ivoflipse commented 10 years ago

This is odd, the creation of a measurement is wrapped in a try/except clause within the measurementwidget (which feels like the wrong place to take care of this).

I wonder what made it trip up, perhaps it gets stuck within the try clause, without failing

ivoflipse commented 10 years ago

Ok, so the tricky part is within Measurement.create_measurement, where I load the file if its zipped or zip it if its not. Its not really nice to zip files which should not be zipped, though I don't know how I could check for this in a clean way.

ivoflipse commented 10 years ago

Strange I'm not getting an error when I try adding a desktop.ini file. So I'm closing this for now, until it I figure out how to reproduce it...

ivoflipse commented 10 years ago

OK, I guys I had an incorrect understanding of how error handling is propagated, which now seems to make sense. So I've moved the try/except clause deeper into the calling stack so it fails sooner and just silently moves on. This might surprise users though, so while I log that something goes wrong, I might have to add more feedback at some point.