I’m using the Intel D435 camera in combination with the C# wrapper api to make an application. However, when I disconnect the camera I get a nuitrack::TerminateException which I can’t seem to catch. Since I want my program to keep running and show a status disconnected for the camera, I would like to know if it is possible to either catch the nuitrack::TerminateException or prevent this exception from completely shutting down my program.
One way is to run Nuitrack in a different thread but I’m hoping there is a more elegant solution which also doesn’t force me to reinitialize Nuitrack every time.
There no correct way to restart nuitrack after this sort of crash in c# currently.
In c++ you could capture the error and call release(); and then Initialise(); once a device is connected.
But given you are using an intel camera - you would also ideally need to call a realsense context and use that to track for connection of a sensor before calling initialise() .