From: Braden M. <br...@us...> - 2005-11-27 06:13:11
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25211/src/libopenvrml/openvrml Modified Files: Vrml97Parser.g X3DVrmlParser.g browser.cpp node.cpp vrml97node.cpp Log Message: Changed error messages not to look so much like sentences. Index: X3DVrmlParser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/X3DVrmlParser.g,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** X3DVrmlParser.g 26 Nov 2005 22:04:33 -0000 1.6 --- X3DVrmlParser.g 27 Nov 2005 06:13:00 -0000 1.7 *************** *** 219,224 **** if (false) { } else { ! throw antlr::SemanticException("Unsupported profile \"" ! + id->getText() + "\".", this->uri, id->getLine(), --- 219,224 ---- if (false) { } else { ! throw antlr::SemanticException("unsupported profile \"" ! + id->getText() + "\"", this->uri, id->getLine(), Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** browser.cpp 27 Nov 2005 05:30:21 -0000 1.103 --- browser.cpp 27 Nov 2005 06:13:00 -0000 1.104 *************** *** 7973,7977 **** */ openvrml::invalid_url::invalid_url(): ! bad_url("Invalid URI.") {} --- 7973,7977 ---- */ openvrml::invalid_url::invalid_url(): ! bad_url("invalid URI") {} *************** *** 8016,8020 **** */ openvrml::unreachable_url::unreachable_url(): ! bad_url("Unreachable URI.") {} --- 8016,8020 ---- */ openvrml::unreachable_url::unreachable_url(): ! bad_url("unreachable URI") {} *************** *** 8037,8041 **** */ openvrml::no_alternative_url::no_alternative_url(): ! bad_url("No alternative URI could be resolved.") {} --- 8037,8041 ---- */ openvrml::no_alternative_url::no_alternative_url(): ! bad_url("no alternative URI could be resolved") {} Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** vrml97node.cpp 26 Nov 2005 06:30:40 -0000 1.85 --- vrml97node.cpp 27 Nov 2005 06:13:00 -0000 1.86 *************** *** 19562,19566 **** error = FT_Init_FreeType(&this->freeTypeLibrary); if (error) { ! browser.err << "Error initializing FreeType library." << std::endl; } # endif // OPENVRML_ENABLE_RENDER_TEXT_NODE --- 19562,19566 ---- error = FT_Init_FreeType(&this->freeTypeLibrary); if (error) { ! browser.err << "error initializing FreeType library" << std::endl; } # endif // OPENVRML_ENABLE_RENDER_TEXT_NODE *************** *** 19576,19580 **** error = FT_Done_FreeType(this->freeTypeLibrary); if (error) { ! this->browser().err << "Error shutting down FreeType library." << std::endl; } --- 19576,19580 ---- error = FT_Done_FreeType(this->freeTypeLibrary); if (error) { ! this->browser().err << "error shutting down FreeType library" << std::endl; } *************** *** 20844,20848 **** // explicit FreeTypeError(FT_Error): ! std::runtime_error("FreeType error.") {} --- 20844,20848 ---- // explicit FreeTypeError(FT_Error): ! std::runtime_error("FreeType error") {} Index: node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** node.cpp 21 Nov 2005 06:07:09 -0000 1.67 --- node.cpp 27 Nov 2005 06:13:00 -0000 1.68 *************** *** 58,63 **** unsupported_interface(const node_interface & interface) throw (): ! std::logic_error("Unsupported interface \"" ! + boost::lexical_cast<std::string>(interface) + "\".") {} --- 58,63 ---- unsupported_interface(const node_interface & interface) throw (): ! std::logic_error("unsupported interface \"" ! + boost::lexical_cast<std::string>(interface) + "\"") {} *************** *** 900,904 **** */ openvrml::field_value_type_mismatch::field_value_type_mismatch(): ! std::logic_error("Field value types do not match.") {} --- 900,904 ---- */ openvrml::field_value_type_mismatch::field_value_type_mismatch(): ! std::logic_error("field value types do not match") {} Index: Vrml97Parser.g =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/Vrml97Parser.g,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Vrml97Parser.g 26 Nov 2005 22:04:33 -0000 1.37 --- Vrml97Parser.g 27 Nov 2005 06:13:00 -0000 1.38 *************** *** 669,675 **** scope->find_node(id1->getText())); if (!n) { ! throw SemanticException("Node \"" + id1->getText() + "\" has not been defined in " ! + "this scope.", this->uri, id1->getLine(), --- 669,675 ---- scope->find_node(id1->getText())); if (!n) { ! throw SemanticException("node \"" + id1->getText() + "\" has not been defined in " ! + "this scope", this->uri, id1->getLine(), *************** *** 746,752 **** if (!scope->add_type(node_type)) { using antlr::SemanticException; ! throw SemanticException("Node type \"" + node_type->id() + "\" has already been defined in " ! "this scope.", this->uri, id->getLine(), --- 746,752 ---- if (!scope->add_type(node_type)) { using antlr::SemanticException; ! throw SemanticException("node type \"" + node_type->id() + "\" has already been defined in " ! "this scope", this->uri, id->getLine(), *************** *** 915,921 **** scope->find_node(id1->getText())); if (!n) { ! throw SemanticException("Node \"" + id1->getText() + "\" has not been defined in " ! + "this scope.", this->uri, id1->getLine(), --- 915,921 ---- scope->find_node(id1->getText())); if (!n) { ! throw SemanticException("node \"" + id1->getText() + "\" has not been defined in " ! + "this scope", this->uri, id1->getLine(), *************** *** 988,994 **** if (!scope->add_type(node_type)) { using antlr::SemanticException; ! throw SemanticException("Node type \"" + node_type->id() + "\" has already been defined in " ! + "this scope.", this->uri, id->getLine(), --- 988,994 ---- if (!scope->add_type(node_type)) { using antlr::SemanticException; ! throw SemanticException("node type \"" + node_type->id() + "\" has already been defined in " ! + "this scope", this->uri, id->getLine(), *************** *** 1058,1064 **** scope.find_node(from_node_id->getText()); if (!from_node) { ! throw SemanticException("Node \"" + from_node_id->getText() + "\" has not been defined in this " ! "scope.", this->uri, from_node_id->getLine(), --- 1058,1064 ---- scope.find_node(from_node_id->getText()); if (!from_node) { ! throw SemanticException("node \"" + from_node_id->getText() + "\" has not been defined in this " ! "scope", this->uri, from_node_id->getLine(), *************** *** 1069,1075 **** scope.find_node(to_node_id->getText()); if (!to_node) { ! throw SemanticException("Node \"" + to_node_id->getText() + "\" has not been defined in this " ! "scope.", this->uri, to_node_id->getLine(), --- 1069,1075 ---- scope.find_node(to_node_id->getText()); if (!to_node) { ! throw SemanticException("node \"" + to_node_id->getText() + "\" has not been defined in this " ! "scope", this->uri, to_node_id->getLine(), *************** *** 1105,1111 **** scope.find_node(from_node_id->getText()); if (!from_node) { ! throw SemanticException("Node \"" + from_node_id->getText() + "\" has not been defined in this " ! "scope.", this->uri, from_node_id->getLine(), --- 1105,1111 ---- scope.find_node(from_node_id->getText()); if (!from_node) { ! throw SemanticException("node \"" + from_node_id->getText() + "\" has not been defined in this " ! "scope", this->uri, from_node_id->getLine(), *************** *** 1116,1122 **** scope.find_node(to_node_id->getText()); if (!to_node) { ! throw SemanticException("Node \"" + to_node_id->getText() + "\" has not been defined in this " ! "scope.", this->uri, to_node_id->getLine(), --- 1116,1122 ---- scope.find_node(to_node_id->getText()); if (!to_node) { ! throw SemanticException("node \"" + to_node_id->getText() + "\" has not been defined in this " ! "scope", this->uri, to_node_id->getLine(), *************** *** 1141,1145 **** throw SemanticException(from_node->type().id() + " node has " "no eventOut \"" ! + eventout_id->getText() + "\".", this->uri, eventout_id->getLine(), --- 1141,1145 ---- throw SemanticException(from_node->type().id() + " node has " "no eventOut \"" ! + eventout_id->getText() + "\"", this->uri, eventout_id->getLine(), *************** *** 1156,1160 **** throw SemanticException(to_node->type().id() + " node has no " "eventIn \"" + eventin_id->getText() ! + "\".", this->uri, eventin_id->getLine(), --- 1156,1160 ---- throw SemanticException(to_node->type().id() + " node has no " "eventIn \"" + eventin_id->getText() ! + "\"", this->uri, eventin_id->getLine(), *************** *** 1163,1168 **** if (to_interface->field_type != from_interface->field_type) { ! throw SemanticException("Mismatch between eventOut and " ! "eventIn types.", this->uri, eventin_id->getLine(), --- 1163,1168 ---- if (to_interface->field_type != from_interface->field_type) { ! throw SemanticException("mismatch between eventOut and " ! "eventIn types", this->uri, eventin_id->getLine(), *************** *** 1210,1215 **** nodeType = scope->find_type(nodeTypeId->getText()); if (!nodeType) { ! throw SemanticException("Unknown node type \"" ! + nodeTypeId->getText() + "\".", this->uri, nodeTypeId->getLine(), --- 1210,1215 ---- nodeType = scope->find_type(nodeTypeId->getText()); if (!nodeType) { ! throw SemanticException("unknown node type \"" ! + nodeTypeId->getText() + "\"", this->uri, nodeTypeId->getLine(), *************** *** 1241,1246 **** } catch [std::bad_cast & ex] { ! throw SemanticException("Incorrect value type for field or " ! "exposedField.", this->uri, LT(1)->getLine(), --- 1241,1246 ---- } catch [std::bad_cast & ex] { ! throw SemanticException("incorrect value type for field or " ! "exposedField", this->uri, LT(1)->getLine(), *************** *** 1284,1289 **** initial_values.insert(make_pair(id->getText(), fv)).second; if (!succeeded) { ! throw SemanticException("Value for " + id->getText() ! + " already declared.", this->uri, id->getLine(), --- 1284,1289 ---- initial_values.insert(make_pair(id->getText(), fv)).second; if (!succeeded) { ! throw SemanticException("value for " + id->getText() ! + " already declared", this->uri, id->getLine(), *************** *** 1353,1359 **** .second; if (!succeeded) { ! throw SemanticException("Interface \"" + id->getText() + "\" already declared for Script " ! "node.", this->uri, id->getLine(), --- 1353,1359 ---- .second; if (!succeeded) { ! throw SemanticException("interface \"" + id->getText() + "\" already declared for Script " ! "node", this->uri, id->getLine(), *************** *** 1413,1418 **** nodeType = scope->find_type(nodeTypeId->getText()); if (!nodeType) { ! throw SemanticException("Unknown node type \"" ! + nodeTypeId->getText() + "\".", this->uri, nodeTypeId->getLine(), --- 1413,1418 ---- nodeType = scope->find_type(nodeTypeId->getText()); if (!nodeType) { ! throw SemanticException("unknown node type \"" ! + nodeTypeId->getText() + "\"", this->uri, nodeTypeId->getLine(), *************** *** 1461,1466 **** find_interface(node_interfaces, interface_id->getText()); if (impl_node_interface == node_interfaces.end()) { ! throw SemanticException("Node has no interface \"" ! + interface_id->getText() + "\".", this->uri, interface_id->getLine(), --- 1461,1466 ---- find_interface(node_interfaces, interface_id->getText()); if (impl_node_interface == node_interfaces.end()) { ! throw SemanticException("node has no interface \"" ! + interface_id->getText() + "\"", this->uri, interface_id->getLine(), *************** *** 1565,1571 **** if (!succeeded) { using antlr::SemanticException; ! throw SemanticException("Interface \"" + id->getText() + "\" already declared for Script " ! "node.", this->uri, id->getLine(), --- 1565,1571 ---- if (!succeeded) { using antlr::SemanticException; ! throw SemanticException("interface \"" + id->getText() + "\" already declared for Script " ! "node", this->uri, id->getLine(), *************** *** 1783,1788 **** : val=floatValue { if (val < 0.0 || val > 1.0) { ! this->reportWarning("Color component values must be from 0 to " ! "1."); if (val < 0.0) { val = 0.0; --- 1783,1788 ---- : val=floatValue { if (val < 0.0 || val > 1.0) { ! this->reportWarning( ! "color component values must be from 0 to 1"); if (val < 0.0) { val = 0.0; *************** *** 1839,1844 **** pixel=intValue { if (!(pixel_index < x * y)) { ! throw SemanticException("Too many pixel values for " ! "SFImage.", this->uri, LT(1)->getLine(), --- 1839,1844 ---- pixel=intValue { if (!(pixel_index < x * y)) { ! throw SemanticException("too many pixel values for " ! "SFImage", this->uri, LT(1)->getLine(), *************** *** 1849,1854 **** )* { if (pixel_index != x * y) { ! throw antlr::SemanticException("Insufficient pixel values for " ! "SFImage.", this->uri, LT(1)->getLine(), --- 1849,1854 ---- )* { if (pixel_index != x * y) { ! throw antlr::SemanticException("insufficient pixel values for " ! "SFImage", this->uri, LT(1)->getLine(), *************** *** 2036,2041 **** const float axisLength = axis.length(); if (!fequal<float>()(axisLength, 1.0f)) { ! this->reportWarning("The axis component of a rotation must be " ! "a normalized vector."); if (fequal<float>()(axisLength, 0.0f)) { axis.z(1.0); --- 2036,2041 ---- const float axisLength = axis.length(); if (!fequal<float>()(axisLength, 1.0f)) { ! this->reportWarning("axis component of a rotation must be " ! "a normalized vector"); if (fequal<float>()(axisLength, 0.0f)) { axis.z(1.0); |