Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
3b44e263
Commit
3b44e263
authored
12 years ago
by
Dmitry Simonenko
Browse files
Options
Downloads
Patches
Plain Diff
lua-box-error: export error ids to the box.error table.
parent
8213d07c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lua/init.m
+15
-0
15 additions, 0 deletions
src/lua/init.m
test/box/lua.result
+20
-19
20 additions, 19 deletions
test/box/lua.result
with
35 additions
and
19 deletions
src/lua/init.m
+
15
−
0
View file @
3b44e263
...
...
@@ -1334,6 +1334,20 @@ tarantool_lua_register_type(struct lua_State *L, const char *type_name,
lua
_
pop
(
L
,
1
)
;
}
static
const
struct
luaL
_
reg
errorlib
[]
=
{
{
NULL
,
NULL
}
}
;
static
void
tarantool
_
lua
_
error
_
init
(
struct
lua
_
State
*
L
)
{
luaL
_
register
(
L
,
"box.error"
,
errorlib
)
;
for
(
int
i
=
0
;
i
<
tnt
_
error
_
codes
_
enum
_
MAX
;
i
++
)
{
lua
_
pushnumber
(
L
,
i
)
;
lua
_
setfield
(
L
,
-
2
,
tnt
_
error
_
codes
[
i
]
.
errstr
)
;
}
lua
_
pop
(
L
,
1
)
;
}
struct
lua
_
State
*
tarantool
_
lua
_
init
()
{
...
...
@@ -1370,6 +1384,7 @@ tarantool_lua_init()
tarantool
_
lua
_
uuid
_
init
(
L
)
;
tarantool
_
lua
_
socket
_
init
(
L
)
;
tarantool
_
lua
_
session
_
init
(
L
)
;
tarantool
_
lua
_
error
_
init
(
L
)
;
mod
_
lua
_
init
(
L
)
;
...
...
This diff is collapsed.
Click to expand it.
test/box/lua.result
+
20
−
19
View file @
3b44e263
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment