From af45046ccf437bd0cc526f898385f6a837a6be18 Mon Sep 17 00:00:00 2001 From: Albert Ho Date: Wed, 7 Aug 2024 17:41:55 -0700 Subject: [PATCH] go log error status & message stack --- binding/go/rhino.go | 1 + binding/go/rhino_native.go | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/binding/go/rhino.go b/binding/go/rhino.go index ceb195c4..4437291a 100644 --- a/binding/go/rhino.go +++ b/binding/go/rhino.go @@ -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", diff --git a/binding/go/rhino_native.go b/binding/go/rhino_native.go index 8ec05d87..f90f3c0d 100644 --- a/binding/go/rhino_native.go +++ b/binding/go/rhino_native.go @@ -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 ( @@ -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 }