Closed mdavidsaver closed 3 years ago
It would be helpful if aravis library errors could be propagated and printed instead of a unhelpfully generic message like eg. "Making stream failed".
https://github.com/areaDetector/ADAravis/blob/45ec346cb75e13487774f0866b2630bf591a4a99/aravisApp/src/ADAravis.cpp#L435-L439
This would entail passing a GError** as the last argument of arv_camera_create_stream(), and then printing GError::message.
GError**
arv_camera_create_stream()
GError::message
GError* err = NULL; this->stream = arv_camera_create_stream (this->camera, NULL, NULL, &err); if (this->stream == NULL) { asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, "%s:%s: Making stream failed, retrying in 5s... : %s\n", driverName, functionName, err->message); g_error_free(err);
GError* need to be freed with g_error_free(). cf. GErrorHelper is a c++ish way to ensure that this is done: https://github.com/mdavidsaver/aravisGigE/blob/d90a9995886b3d7590a17f5ebf4e28886f7ed2dd/aravisGigEApp/src/ghelper.h#L50
GError*
g_error_free()
GErrorHelper err; this->stream = arv_camera_create_stream (this->camera, NULL, NULL, err.get()); if (this->stream == NULL) { asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, "%s:%s: Making stream failed, retrying in 5s... : %s\n", driverName, functionName, err->message);
Done via 4637163a3cf49008159234212686203c1b666cd1.
It would be helpful if aravis library errors could be propagated and printed instead of a unhelpfully generic message like eg. "Making stream failed".
https://github.com/areaDetector/ADAravis/blob/45ec346cb75e13487774f0866b2630bf591a4a99/aravisApp/src/ADAravis.cpp#L435-L439
This would entail passing a
GError**
as the last argument ofarv_camera_create_stream()
, and then printingGError::message
.GError*
need to be freed withg_error_free()
. cf. GErrorHelper is a c++ish way to ensure that this is done: https://github.com/mdavidsaver/aravisGigE/blob/d90a9995886b3d7590a17f5ebf4e28886f7ed2dd/aravisGigEApp/src/ghelper.h#L50