Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
44222d43
Commit
44222d43
authored
Feb 19, 2019
by
David Venhoek
Browse files
Changed two json encoding errors that should never occur to panics.
parent
7fe5b20f
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/irmac/capi.go
View file @
44222d43
...
...
@@ -110,8 +110,8 @@ func GetSessionResult(token *C.char) *C.char {
}
resultJson
,
err
:=
json
.
Marshal
(
result
)
if
err
!=
nil
{
// encoding error
return
C
.
CString
(
err
.
Error
()
)
// encoding error
, should never occur
panic
(
err
)
}
return
C
.
CString
(
string
(
resultJson
))
}
...
...
@@ -132,8 +132,8 @@ func GetRequest(token *C.char) *C.char {
}
resultJson
,
err
:=
json
.
Marshal
(
result
)
if
err
!=
nil
{
// encoding error
return
C
.
CString
(
err
.
Error
()
)
// encoding error
, should never occur
panic
(
err
)
}
return
C
.
CString
(
string
(
resultJson
))
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment