Re: [go-nuts] Re: Issue with Adding Exception Vector Handler in Go

2025-01-18 Thread rudeus greyrat
Thanks for answering. Basically I found a work around. As I said, I understand go handles error differently, but imagine my windows OS send an exception signal not handled by go, how to handle this ? Escpecially given I don;'t just want the default Go handler that print the stack with the exce

Re: [go-nuts] Re: Issue with Adding Exception Vector Handler in Go

2025-01-18 Thread Robert Engels
You may also want to look into ago “signal handling” as a potential solution. On Jan 18, 2025, at 8:06 AM, Robert Engels wrote:If that wasn’t clear. It doesn’t seem to be supported. You need to catch the exception in the native code and return an error code back to Go. On Jan 18, 2025, at 7:32 AM

Re: [go-nuts] Re: Issue with Adding Exception Vector Handler in Go

2025-01-18 Thread Robert Engels
If that wasn’t clear. It doesn’t seem to be supported. You need to catch the exception in the native code and return an error code back to Go. On Jan 18, 2025, at 7:32 AM, Robert Engels wrote:Go and C handle errors differently: Go: Go uses error values returned from functions to handle errors. Th

Re: [go-nuts] Re: Issue with Adding Exception Vector Handler in Go

2025-01-18 Thread Robert Engels
Go and C handle errors differently: Go: Go uses error values returned from functions to handle errors. This approach makes error handling explicit and encourages developers to handle them gracefully. C: C often uses exceptions and signals to handle errors. However, C's error handling mechanisms don

[go-nuts] Re: Issue with Adding Exception Vector Handler in Go

2025-01-18 Thread rudeus greyrat
The issue seems to come from firstcontinuehandler, I tweaked it a little and it is getting better ``` // It seems Windows searches ContinueHandler's list even // if ExceptionHandler returns EXCEPTION_CONTINUE_EXECUTION. // firstcontinuehandler will stop that search, // if exceptionhandler did the

[go-nuts] Re: Issue with Adding Exception Vector Handler in Go

2025-01-18 Thread rudeus greyrat
Any idea please ? Been stuck at this for quite some time, seems that Go is neglecting the return uintptr(handler.EXCEPTION_CONTINUE_SEARCH) and going into panic mode ... Le vendredi 17 janvier 2025 à 16:30:24 UTC+1, rudeus greyrat a écrit : > > https://stackoverflow.com/questions/79365198/cann

[go-nuts] Re: Issue with Adding Exception Vector Handler in Go

2025-01-17 Thread rudeus greyrat
https://stackoverflow.com/questions/79365198/cannot-continue-after-entering-vectored-exception-handler-in-go asked the question here too if people want to have syntax highlight Le vendredi 17 janvier 2025 à 14:16:30 UTC+1, rudeus greyrat a écrit : > PS: I know there is defer recover mechanism in

[go-nuts] Re: Issue with Adding Exception Vector Handler in Go

2025-01-17 Thread rudeus greyrat
PS: I know there is defer recover mechanism in Go that can be used to handle exception... But I would like to use AddVectoredExceptionHandler (maybe it is already used behind the scene with defer recover ?) because I can inspect the thread context in myhandler function Le vendredi 17 janvier 20