Skip to content

Commit 26d9e9f

Browse files
Revert "1"
This reverts commit e3329b73f23fd3f75553ceb47f9e82da169abeab.
1 parent a3bc8c4 commit 26d9e9f

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

box_error.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package tarantool
22

3+
const error_extId = 3
4+
35
// BoxError is a type representing Tarantool `box.error` object: a single
46
// MP_ERROR_STACK object with a link to the previous stack error.
57
type BoxError struct {

msgpack.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ func msgpackIsString(code byte) bool {
4848
return msgpcode.IsFixedString(code) || code == msgpcode.Str8 ||
4949
code == msgpcode.Str16 || code == msgpcode.Str32
5050
}
51+
52+
func init() {
53+
msgpack.RegisterExt(error_extId, &BoxError{})
54+
}

msgpack_v5.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ func msgpackIsString(code byte) bool {
5252
return msgpcode.IsFixedString(code) || code == msgpcode.Str8 ||
5353
code == msgpcode.Str16 || code == msgpcode.Str32
5454
}
55+
56+
func init() {
57+
msgpack.RegisterExt(error_extId, (*BoxError)(nil))
58+
}

0 commit comments

Comments
 (0)