Commit 44222d43 authored by David Venhoek's avatar David Venhoek
Browse files

Changed two json encoding errors that should never occur to panics.

parent 7fe5b20f
......@@ -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))
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment