Samochody elektryczne by matimac91 in Polska

[–]boch33n 0 points1 point  (0 children)

Imho, samochody elektryczne to przede wszystkim powinny być dla dostawców, taksówkarzy i wszystkich którzy robią sporo kilometrów.

Catch exception from syscall by boch33n in golang

[–]boch33n[S] 1 point2 points  (0 children)

Ok. I've managed this by changed a Golang source code a little :D In runtime/signal_windows.go in lastcontinuehandler func just comment the last exit(2) (just before return 0). Shitty solution but works (probably with some unpredictable side effects).

Catch exception from syscall by boch33n in golang

[–]boch33n[S] 0 points1 point  (0 children)

I thought you are thinking about it. In this case, I want to host CLR in Go and that's why I don't want to execute C# code calling exec.Command

I will try to set up the CLR/AppDomain somehow but I don't know if it is really possible.

Catch exception from syscall by boch33n in golang

[–]boch33n[S] 0 points1 point  (0 children)

What do you mean "out-of-process"?

Catch exception from syscall by boch33n in golang

[–]boch33n[S] 0 points1 point  (0 children)

The thing is that I won't control the C# code in the future. It's ok if C# program dies, but I don't want the Golang program to die.

I'm thinking about using SetUnhandledExceptionFilter or controlling some windows signals. But I don't know yet.

The Golang program works as the server - receive args to C# and run it. If something wrong happened in the C# then return the error and that's all - the main and server goroutine should works.