json error handler : use MAPNIK_LOG_ERROR and better message
This commit is contained in:
parent
ebe0021679
commit
f4694d03ff
2 changed files with 3 additions and 1 deletions
|
@ -97,7 +97,7 @@ struct error_handler
|
|||
Iterator first, Iterator last,
|
||||
Iterator err_pos, boost::spirit::info const& what) const
|
||||
{
|
||||
MAPNIK_LOG_WARN(error_handler) << what << " expected in input";
|
||||
MAPNIK_LOG_ERROR(error_handler) << what << " expected but got: " << where_message()(err_pos, last, 16);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -114,8 +114,10 @@ feature_grammar<Iterator,FeatureType,ErrorHandler>::feature_grammar(mapnik::tran
|
|||
attribute_value %= json_.number | json_.string_ ;
|
||||
|
||||
feature.name("Feature");
|
||||
feature_type.name("Feature Type");
|
||||
properties.name("Properties");
|
||||
attributes.name("Attributes");
|
||||
attribute_value.name("Attribute Value");
|
||||
|
||||
on_error<fail>(feature, error_handler(_1, _2, _3, _4));
|
||||
|
||||
|
|
Loading…
Reference in a new issue