From: Braden M. <br...@us...> - 2007-09-04 08:15:04
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19795/src/libopenvrml/openvrml Modified Files: vrml97node.cpp Log Message: Catch any exception thrown in the process of creating the image stream. Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** vrml97node.cpp 1 Jul 2007 01:38:40 -0000 1.132 --- vrml97node.cpp 4 Sep 2007 08:15:05 -0000 1.133 *************** *** 12489,12507 **** /** ! * @brief Called to lazily update texture data. */ void image_texture_node::update_texture() { if (this->texture_needs_update) { ! if (!this->url_.mfstring::value().empty()) { ! using std::auto_ptr; ! auto_ptr<resource_istream> in( ! this->scene()->get_resource(this->url_.mfstring::value())); ! auto_ptr<stream_listener> listener( ! new image_stream_listener(in->url(), ! this->image_, ! *this, ! this->image_mutex_)); ! this->scene()->read_stream(in, listener); } this->texture_needs_update = false; --- 12489,12512 ---- /** ! * @brief Called to update texture data lazily. */ void image_texture_node::update_texture() { if (this->texture_needs_update) { ! try { ! if (!this->url_.mfstring::value().empty()) { ! using std::auto_ptr; ! auto_ptr<resource_istream> in( ! this->scene()->get_resource( ! this->url_.mfstring::value())); ! auto_ptr<stream_listener> listener( ! new image_stream_listener(in->url(), ! this->image_, ! *this, ! this->image_mutex_)); ! this->scene()->read_stream(in, listener); ! } ! } catch (std::exception & ex) { ! this->scene()->browser().err(ex.what()); } this->texture_needs_update = false; *************** *** 12519,12523 **** * @brief Construct. * ! * @param browser the @c browser associated with this @c node_metatype object. */ indexed_face_set_metatype:: --- 12524,12529 ---- * @brief Construct. * ! * @param browser the @c browser associated with this @c node_metatype ! * object. */ indexed_face_set_metatype:: |