Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve location info for some error messages #6039

Merged
merged 1 commit into from Jan 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/config/config_parser.yy
Expand Up @@ -388,7 +388,7 @@ object:
bool defaultTmpl = $6;

if (!abstract && defaultTmpl)
BOOST_THROW_EXCEPTION(ScriptError("'default' keyword is invalid for object definitions", DebugInfoRange(@2, @4)));
BOOST_THROW_EXCEPTION(ScriptError("'default' keyword is invalid for object definitions", @6));

bool seen_assign = context->m_SeenAssign.top();
context->m_SeenAssign.pop();
Expand Down Expand Up @@ -1158,7 +1158,7 @@ apply:
delete $6;

if (!ApplyRule::IsValidSourceType(type))
BOOST_THROW_EXCEPTION(ScriptError("'apply' cannot be used with type '" + type + "'", DebugInfoRange(@2, @3)));
BOOST_THROW_EXCEPTION(ScriptError("'apply' cannot be used with type '" + type + "'", @3));

if (!ApplyRule::IsValidTargetType(type, target)) {
if (target == "") {
Expand All @@ -1178,7 +1178,7 @@ apply:

BOOST_THROW_EXCEPTION(ScriptError("'apply' target type is ambiguous (can be one of " + typeNames + "): use 'to' to specify a type", DebugInfoRange(@2, @3)));
} else
BOOST_THROW_EXCEPTION(ScriptError("'apply' target type '" + target + "' is invalid", DebugInfoRange(@2, @5)));
BOOST_THROW_EXCEPTION(ScriptError("'apply' target type '" + target + "' is invalid", @6));
}

bool seen_assign = context->m_SeenAssign.top();
Expand Down