include actual size in error message (#490)

* include actual size in error message

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>

* use %u for existing arguments

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
This commit is contained in:
Dirk Thomas 2019-08-20 11:54:42 -07:00 committed by GitHub
parent 41792cb6e8
commit b66395dc57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -936,7 +936,8 @@ static rcutils_ret_t parse_value(
if (val_size > MAX_STRING_SIZE) {
RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(
"Scalar value at line %d is bigger than %d bytes", line_num, MAX_STRING_SIZE);
"Scalar value at line %u has %zu bytes which is bigger than the compile "
"time limit of %u bytes", line_num, val_size, MAX_STRING_SIZE);
return RCUTILS_RET_ERROR;
} else {
if (style != YAML_SINGLE_QUOTED_SCALAR_STYLE &&