USGS-CIDA/ncSOSx — pull request #2 by tkunicki-usgs (2013-01-31 21:18:53+00:00)
Title: Make sure cached file is deleted if exception thrown during write

Added catch blocks for exceptions thrown during file write. Note the repetitive code... The writer close was pulled out of the finally and repeated in the try and both catch blocks. This repetition is needed so that the writer close can be called before a file delete in the catch (we dont't want to delete in catch then close in finally) The multiple catch blocks are so that the exceptions are properly typed for (re)throw.