robmcmullen / omnivore

Hex editor and debugging emulator, sponsored by the Player/Missile Podcast
Mozilla Public License 2.0
53 stars 7 forks source link

Revert of file doesn't fail gracefully when source file removed #197

Closed robmcmullen closed 7 years ago

robmcmullen commented 7 years ago

Editing a file, then file was removed outside Omnivore, and tried to revert:

Traceback (most recent call last):
  File "/noaa/maproom-deps/omnivore/pyface/ui/wx/action/action_item.py", line 277, in _on_menu
    self.controller.perform(action, action_event)
  File "/noaa/maproom-deps/omnivore/pyface/tasks/action/task_action_controller.py", line 31, in perform
    return action.perform(event)
  File "/noaa/maproom-deps/omnivore/omnivore/framework/actions.py", line 199, in perform
    guess = FileGuess(self.active_editor.document.metadata.uri)
  File "/noaa/maproom-deps/omnivore/omnivore/utils/file_guess.py", line 85, in __init__
    self.reload(uri)
  File "/noaa/maproom-deps/omnivore/omnivore/utils/file_guess.py", line 100, in reload
    fh, fs, relpath = self.get_fs(uri)
  File "/noaa/maproom-deps/omnivore/omnivore/utils/file_guess.py", line 96, in get_fs
    fh = fs.open(relpath, "rb")
  File "/noaa/maproom-deps/omnivore/fs/errors.py", line 257, in wrapper
    return func(self,*args,**kwds)
  File "/noaa/maproom-deps/omnivore/fs/osfs/__init__.py", line 236, in open
    return io.open(sys_path, mode=mode, buffering=buffering, encoding=encoding, errors=errors, newline=newline)
ResourceNotFoundError: Resource not found: /hisprite

Should pop up error dialog instead of crash dialog