Index: OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp
===================================================================
--- OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp (revision 8578)
+++ OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp (revision 10763)
@@ -52,5 +52,9 @@
 void user_error_fn(png_structp png_ptr, png_const_charp error_msg)
 {
+#ifdef OSG_CPP_EXCEPTIONS_AVAILABLE
     throw PNGError(error_msg);
+#else
+    osg::notify(osg::WARN) << "PNG lib warning : " << error_msg << std::endl;
+#endif
 }
 
@@ -167,7 +171,8 @@
             png_set_error_fn(png, png_get_error_ptr(png), user_error_fn, user_warning_fn);
 
+            #ifdef OSG_CPP_EXCEPTIONS_AVAILABLE
             try
+            #endif
             {
-
                 info = png_create_info_struct(png);
                 endinfo = png_create_info_struct(png);
@@ -301,5 +306,7 @@
 
                 return pOsgImage;
-            }
+
+            }
+            #ifdef OSG_CPP_EXCEPTIONS_AVAILABLE
             catch (PNGError& err)
             {
@@ -308,4 +315,5 @@
                 return ReadResult::ERROR_IN_READING_FILE;
             }
+            #endif
         }
 
