LV
─[leonid@vasya-L460]─[~/work/mail/tarantool/tmp2]
└──╼ tarantool
Tarantool 2.5.2-11-g6bd5e23
type 'help' for interactive help
tarantool> box.cfg{listen="localhost:1918"}
2020-12-04 14:30:15.666 [21046] main/103/interactive C> Tarantool 2.5.2-11-g6bd5e23
2020-12-04 14:30:15.666 [21046] main/103/interactive C> log level 5
2020-12-04 14:30:15.667 [21046] main/103/interactive I> mapping 268435456 bytes for memtx tuple arena...
2020-12-04 14:30:15.667 [21046] main/103/interactive I> mapping 134217728 bytes for vinyl tuple arena...
2020-12-04 14:30:15.672 [21046] main/103/interactive I> instance uuid 92ebfaef-4b56-40ce-95f0-3dd82380c1ba
2020-12-04 14:30:15.674 [21046] iproto/101/main I> binary: bound to 127.0.0.1:1918
2020-12-04 14:30:15.674 [21046] main/103/interactive I> initializing an empty data directory
2020-12-04 14:30:15.735 [21046] main/103/interactive I> assigned id 1 to replica 92ebfaef-4b56-40ce-95f0-3dd82380c1ba
2020-12-04 14:30:15.737 [21046] main/103/interactive I> cluster uuid af2956f6-1fff-4bc6-b35c-17c864ba31d2
2020-12-04 14:30:15.741 [21046] snapshot/101/main I> saving snapshot `./00000000000000000000.snap.inprogress'
2020-12-04 14:30:15.801 [21046] snapshot/101/main I> done
2020-12-04 14:30:15.803 [21046] main/103/interactive I> ready to accept requests
2020-12-04 14:30:15.805 [21046] main/103/interactive I> set 'log_level' configuration option to 5
2020-12-04 14:30:15.805 [21046] main/105/checkpoint_daemon I> scheduled next checkpoint for Fri Dec 4 16:22:34 2020
2020-12-04 14:30:15.806 [21046] main/103/interactive I> set 'listen' configuration option to "localhost:1918"
2020-12-04 14:30:15.807 [21046] main/103/interactive I> set 'log_format' configuration option to "plain"
---
...
tarantool> function test_error() box.error{code = 3 , reason = "Some reason"} end
---
...
tarantool> box.schema.user.grant('guest', 'super')
---
...
tarantool>
Client
tarantool> ┌─[leonid@vasya-L460]─[~/work/mail/tarantool]
└──╼ tarantool
Tarantool 2.5.2-11-g6bd5e23
type 'help' for interactive help
tarantool> nb = require('net.box')
---
...
tarantool> con = nb.connect("localhost:1918")
---
...
tarantool> res, err = pcall(con.call, con, 'test_error')
---
...
tarantool> err:unpack()
---
- code: 3
base_type: ClientError
type: ClientError
message: Some reason
trace:
- file: '[string "function test_error() box.error{code = 3 , re..."]'
line: 1
...
tarantool>