Mercurial > hg > orthanc-stone
diff Framework/Radiography/RadiographyScene.cpp @ 1258:9c20ae049669
more logs to debug exceptions in Render
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Tue, 14 Jan 2020 15:22:10 +0100 |
parents | 6af941a68472 |
children | 69177b10e2b9 |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyScene.cpp Tue Jan 14 12:05:01 2020 +0100 +++ b/Framework/Radiography/RadiographyScene.cpp Tue Jan 14 15:22:10 2020 +0100 @@ -564,11 +564,24 @@ // Render layers in the background-to-foreground order for (size_t index = 0; index < nextLayerIndex_; index++) { - Layers::const_iterator it = layers_.find(index); - if (it != layers_.end()) + try { - assert(it->second != NULL); - it->second->Render(buffer, viewTransform, interpolation, windowingCenter_, windowingWidth_, applyWindowing); + Layers::const_iterator it = layers_.find(index); + if (it != layers_.end()) + { + assert(it->second != NULL); + it->second->Render(buffer, viewTransform, interpolation, windowingCenter_, windowingWidth_, applyWindowing); + } + } + catch (Orthanc::OrthancException& ex) + { + LOG(ERROR) << "RadiographyScene::Render: " << index << ", OrthancException: " << ex.GetDetails(); + throw ex; // rethrow because we want it to crash to see there's a problem ! + } + catch (...) + { + LOG(ERROR) << "RadiographyScene::Render: " << index << ", unkown exception: "; + throw; // rethrow because we want it to crash to see there's a problem ! } } }