Skip to content

Commit

Permalink
Add index to 'not found' error message
Browse files Browse the repository at this point in the history
  • Loading branch information
dhood committed Jun 4, 2018
1 parent d838bd1 commit fd8fd58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rcl/src/rcl/lexer_lookahead.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ rcl_lexer_lookahead2_expect(
if (type != lexeme) {
if (RCL_LEXEME_NONE == lexeme || RCL_LEXEME_EOF == lexeme) {
RCL_SET_ERROR_MSG_WITH_FORMAT_STRING(
buffer->impl->allocator, "Expected lexeme type (%d) not found", type);
buffer->impl->allocator, "Expected lexeme type (%d) not found, search ended at index %lu",
type, buffer->impl->text_idx);
return RCL_RET_WRONG_LEXEME;
}
RCL_SET_ERROR_MSG_WITH_FORMAT_STRING(
Expand Down

0 comments on commit fd8fd58

Please sign in to comment.