[Wavelet-commit] Wavelet MagickInter.cc,1.6,1.7
Status: Beta
Brought to you by:
herbert
From: Herbert M. D. <he...@us...> - 2010-05-25 08:31:32
|
Update of /cvsroot/wavelet/Wavelet In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv27379 Modified Files: MagickInter.cc Log Message: bugfix: remove temporary files after obtaining images via Magick++ Index: MagickInter.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/MagickInter.cc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MagickInter.cc 19 May 2010 11:42:36 -0000 1.6 --- MagickInter.cc 25 May 2010 08:31:23 -0000 1.7 *************** *** 204,211 **** --- 204,213 ---- catch (const std::ios_base::failure &f) { + (void)remove (tmp.c_str ()); throw std::ios_base::failure (tmp + ": " + f.what ()); } catch (const std::exception &e) { + (void)remove (tmp.c_str ()); throw std::invalid_argument (tmp + ": " + e.what ()); } *************** *** 224,237 **** --- 226,243 ---- std::auto_ptr<ColorImage> result (NEW (ColorImage ())); result->read (tmp.c_str ()); + (void)remove (tmp.c_str ()); return result; } catch (const std::ios_base::failure &f) { + (void)remove (tmp.c_str ()); throw std::ios_base::failure (tmp + ": " + f.what ()); } catch (const std::exception &e) { + (void)remove (tmp.c_str ()); throw std::invalid_argument (tmp + ": " + e.what ()); } + (void)remove (tmp.c_str ()); throw std::invalid_argument (tmp + ": some other / unknown error."); } |