Skip to content

Commit

Permalink
go log error status & message stack
Browse files Browse the repository at this point in the history
  • Loading branch information
albho committed Aug 8, 2024
1 parent edd289e commit af45046
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions binding/go/rhino.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func (rhino *Rhino) Init() error {
if PvStatus(status) != SUCCESS {
errorStatus, messageStack := nativeRhino.nativeGetErrorStack()
if errorStatus != SUCCESS {
fmt.Sprintf("ERROR_STATUS (%d) | MESSAGE_STACK: %s", errorStatus, messageStack)}
return &RhinoError{
StatusCode: errorStatus,
Message: "Unable to get Rhino error state",
Expand Down
3 changes: 0 additions & 3 deletions binding/go/rhino_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ static void pv_free_error_stack_wrapper(
return ((pv_free_error_stack_func) f)(message_stack);
}
*/
import "fmt"

import "C"

import (
Expand Down Expand Up @@ -432,6 +430,5 @@ func (nr *nativeRhinoType) nativeGetErrorStack() (status PvStatus, messageStack
messageStack[i] = C.GoString(messageStackSlice[i])
}

fmt.Println("!ERRORS!: ", PvStatus(ret), messageStack)
return PvStatus(ret), messageStack
}

0 comments on commit af45046

Please sign in to comment.