- Timestamp:
- 11/17/09 13:55:52 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp
r8578 r10763 52 52 void user_error_fn(png_structp png_ptr, png_const_charp error_msg) 53 53 { 54 #ifdef OSG_CPP_EXCEPTIONS_AVAILABLE 54 55 throw PNGError(error_msg); 56 #else 57 osg::notify(osg::WARN) << "PNG lib warning : " << error_msg << std::endl; 58 #endif 55 59 } 56 60 … … 167 171 png_set_error_fn(png, png_get_error_ptr(png), user_error_fn, user_warning_fn); 168 172 173 #ifdef OSG_CPP_EXCEPTIONS_AVAILABLE 169 174 try 175 #endif 170 176 { 171 172 177 info = png_create_info_struct(png); 173 178 endinfo = png_create_info_struct(png); … … 301 306 302 307 return pOsgImage; 303 } 308 309 } 310 #ifdef OSG_CPP_EXCEPTIONS_AVAILABLE 304 311 catch (PNGError& err) 305 312 { … … 308 315 return ReadResult::ERROR_IN_READING_FILE; 309 316 } 317 #endif 310 318 } 311 319
