comparison Framework/Scene2D/Scene2D.cpp @ 956:a7351ad54960

Made IsContextLost automatically set the flag by checking with the emscripten WebGL wrapper + added a LOT of logging messages right before throwing ErrorCode_BadSequenceOfCalls exceptions + increased the http request timeouts from 60 to 600 sec (big datasets in some recent customer use cases) + added IsContext lost through the Viewport/Context layer (to make it reachable from external API) + the same for the underlying device context (for debug)
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 21 Aug 2019 16:16:30 +0200
parents 685c9a2d115f
children d10d2acb8a02 2d8ab34c8c91
comparison
equal deleted inserted replaced
953:118fc5c85d07 956:a7351ad54960
46 46
47 ISceneLayer& GetLayer() const 47 ISceneLayer& GetLayer() const
48 { 48 {
49 if (layer_.get() == NULL) 49 if (layer_.get() == NULL)
50 { 50 {
51 LOG(ERROR) << "Scene2D::Item::GetLayer(): (layer_.get() == NULL)";
51 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 52 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
52 } 53 }
53 else 54 else
54 { 55 {
55 return *layer_; 56 return *layer_;
58 59
59 ISceneLayer* ReleaseLayer() 60 ISceneLayer* ReleaseLayer()
60 { 61 {
61 if (layer_.get() == NULL) 62 if (layer_.get() == NULL)
62 { 63 {
64 LOG(ERROR) << "Scene2D::Item::ReleaseLayer(): (layer_.get() == NULL)";
63 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 65 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
64 } 66 }
65 else 67 else
66 { 68 {
67 return layer_.release(); 69 return layer_.release();