|
From: <br...@us...> - 2009-05-09 06:10:59
|
Revision: 3906
http://openvrml.svn.sourceforge.net/openvrml/?rev=3906&view=rev
Author: braden
Date: 2009-05-09 06:10:56 +0000 (Sat, 09 May 2009)
Log Message:
-----------
Catch (and swallow) any invalid_url exceptions thrown when encountering bad URIs for EXTERNPROTO implementations.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/libopenvrml/openvrml/local/parse_vrml.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-08 05:41:33 UTC (rev 3905)
+++ trunk/ChangeLog 2009-05-09 06:10:56 UTC (rev 3906)
@@ -1,3 +1,12 @@
+2009-05-09 Braden McDaniel <br...@en...>
+
+ * src/libopenvrml/openvrml/local/parse_vrml.h
+ (openvrml::local::vrml97_parse_actions::on_externproto_t::operator()(const
+ std::string &, const node_interface_set &, const
+ std::vector<std::string> &) const): Catch (and swallow) any
+ invalid_url exceptions thrown when encountering bad URIs for
+ EXTERNPROTO implementations.
+
2009-05-08 Braden McDaniel <br...@en...>
* src/openvrml-xembed/browser.cpp
Modified: trunk/src/libopenvrml/openvrml/local/parse_vrml.h
===================================================================
--- trunk/src/libopenvrml/openvrml/local/parse_vrml.h 2009-05-08 05:41:33 UTC (rev 3905)
+++ trunk/src/libopenvrml/openvrml/local/parse_vrml.h 2009-05-09 06:10:56 UTC (rev 3906)
@@ -181,15 +181,15 @@
const uri base_uri =
anonymous_stream_id(uri(this->actions_.uri_))
? this->actions_.scene_.browser().world_url().empty()
- ? create_file_url(uri())
- : uri(this->actions_.scene_.browser().world_url())
+ ? create_file_url(uri())
+ : uri(this->actions_.scene_.browser().world_url())
: uri(this->actions_.uri_);
shared_ptr<node_type> node_type;
for (vector<string>::const_iterator resource_id =
uri_list.begin();
resource_id != uri_list.end();
- ++resource_id) {
+ ++resource_id) try {
const uri absolute_uri = relative(uri(*resource_id))
? resolve_against(uri(*resource_id), base_uri)
: uri(*resource_id);
@@ -202,6 +202,8 @@
interfaces);
break;
}
+ } catch (invalid_url &) {
+ // If a URI is bogus, ignore it and move on.
}
if (!node_type) {
@@ -223,7 +225,7 @@
for (vector<string>::const_iterator resource_id =
uri_list.begin();
resource_id != uri_list.end();
- ++resource_id) {
+ ++resource_id) try {
const uri absolute_uri = relative(uri(*resource_id))
? resolve_against(uri(*resource_id), base_uri)
: uri(*resource_id);
@@ -231,6 +233,9 @@
.add_node_metatype(
node_metatype_id(absolute_uri),
externproto_class);
+ } catch (invalid_url &) {
+ // We don't want to register node_types under bogus
+ // URIs; ignore the bad ones and move on.
}
node_type = externproto_class->create_type(node_type_id,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|