Author: post
Date: 2010-08-24 20:57:18 +0200 (Tue, 24 Aug 2010)
New Revision: 3508

Modified:
   trunk/plugins/load-rawspeed/rawstudio-plugin-api.cpp
Log:
Simplify Exception handling.

Modified: trunk/plugins/load-rawspeed/rawstudio-plugin-api.cpp
===================================================================
--- trunk/plugins/load-rawspeed/rawstudio-plugin-api.cpp        2010-08-24 
18:08:25 UTC (rev 3507)
+++ trunk/plugins/load-rawspeed/rawstudio-plugin-api.cpp        2010-08-24 
18:57:18 UTC (rev 3508)
@@ -67,28 +67,20 @@
                GTimer *gt = g_timer_new();
 #endif
 
-               try
-               {
-                       rs_io_lock();
-                       m = f.readFile();
-                       rs_io_unlock();
-               } catch (FileIOException e) {
-                       printf("RawSpeed: IO Error occured:%s\n", e.what());
-                       g_timer_destroy(gt);
-                       return rs_filter_response_new();
-               }
+               rs_io_lock();
+               m = f.readFile();
+               rs_io_unlock();
 
 #ifdef TIME_LOAD
                printf("RawSpeed Open %s: %.03fs\n", filename, 
g_timer_elapsed(gt, NULL));
                g_timer_destroy(gt);
 #endif
 
-               TiffParser t(m);
-               t.parseData();
-               d = t.getDecoder();
-
                try
                {
+                       TiffParser t(m);
+                       t.parseData();
+                       d = t.getDecoder();
                        gint col, row;
                        gint cpp;
 
@@ -153,6 +145,10 @@
        {
                printf("RawSpeed: TiffParserException: %s\n", e.what());
        }
+       catch (IOException e)
+       {
+               printf("RawSpeed: IOException: %s\n", e.what());
+       }
 
        if (d) delete d;
        if (m) delete m;


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to