Skip to content
Snippets Groups Projects
Commit c84cdc73 authored by Ilya Verbin's avatar Ilya Verbin Committed by Vladimir Davydov
Browse files

console: check lua_yaml_encode error in lbox_console_format_yaml

This patch adds a missed check for `lua_yaml_encode` return value,
similar to the check in `console_dump_plain`. Now Lua error is raised
if YAML encoding failed for any reason (e.g. OOM or formatting error).

Before:
```
tarantool> box.error.new(box.error.ILLEGAL_PARAMS, '\x80')
~/test$ echo $?
0
~/test$
```

After:
```
tarantool> box.error.new(box.error.ILLEGAL_PARAMS, '\x80')
---
- error: 'console: an exception occurred when formatting the output:
    expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS'
...

tarantool>
```

Part of #6781
Part of #6934

NO_DOC=bugfix
NO_TEST=see later commits
NO_CHANGELOG=see later commits
parent 30db3c23
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment