latin-1 error messages in the PLY parser

metadata
Wenzel Jakob 2011-05-20 03:17:53 +02:00
parent 6ad224eeb8
commit 20e66965f6
2 changed files with 5 additions and 5 deletions

View File

@ -392,7 +392,7 @@ inline void ply::ply_parser::parse_scalar_property_definition(const std::string&
}
if (!scalar_property_callback) {
if (warning_callback_) {
warning_callback_(line_number_, "property " + std::string(type_traits<scalar_type>::name()) + " " + property_name + " of element " + current_element_->name + " is not handled");
warning_callback_(line_number_, "property '" + std::string(type_traits<scalar_type>::name()) + " " + property_name + "' of element '" + current_element_->name + "' is not handled");
}
}
current_element_->properties.push_back(std::tr1::shared_ptr<property>(new scalar_property<scalar_type>(property_name, scalar_property_callback)));
@ -416,7 +416,7 @@ inline void ply::ply_parser::parse_list_property_definition(const std::string& p
}
if (!std::tr1::get<0>(list_property_callbacks) || !std::tr1::get<1>(list_property_callbacks) || !std::tr1::get<2>(list_property_callbacks)) {
if (warning_callback_) {
warning_callback_(line_number_, "property list " + std::string(type_traits<size_type>::name()) + " " + std::string(type_traits<scalar_type>::name()) + " " + property_name + " of element " + current_element_->name + " is not handled");
warning_callback_(line_number_, "property 'list " + std::string(type_traits<size_type>::name()) + " " + std::string(type_traits<scalar_type>::name()) + " " + property_name + "' of element '" + current_element_->name + "' is not handled");
}
}
current_element_->properties.push_back(std::tr1::shared_ptr<property>(new list_property<size_type, scalar_type>(property_name, std::tr1::get<0>(list_property_callbacks), std::tr1::get<1>(list_property_callbacks), std::tr1::get<2>(list_property_callbacks))));

View File

@ -39,7 +39,7 @@ bool ply::ply_parser::parse(std::istream& istream)
stringstream >> std::ws;
if (stringstream.eof()) {
if (warning_callback_) {
warning_callback_(line_number_, "ignoring line " + line + "");
warning_callback_(line_number_, "ignoring line '" + line + "'");
}
}
else {
@ -74,7 +74,7 @@ bool ply::ply_parser::parse(std::istream& istream)
}
if (version != "1.0") {
if (error_callback_) {
error_callback_(line_number_, "version " + version + " is not supported");
error_callback_(line_number_, "version '" + version + "' is not supported");
}
return false;
}
@ -375,7 +375,7 @@ bool ply::ply_parser::parse(std::istream& istream)
// unknown keyword
else {
if (warning_callback_) {
warning_callback_(line_number_, "ignoring line " + line + "");
warning_callback_(line_number_, "ignoring line '" + line + "'");
}
}