Mercurial > hg > orthanc-stone
comparison Framework/StoneException.h @ 947:1091b2adeb5a toa2019081001
Fixed animation frame stopping when returning false + big work on the OpenGL
objects to make them lost context-safe + debug code to forcefully tag a
context as lost + debug macros
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Sat, 10 Aug 2019 13:07:31 +0200 |
parents | 101073b3e855 |
children | 32eaf4929b08 |
comparison
equal
deleted
inserted
replaced
946:dbe3e1e47019 | 947:1091b2adeb5a |
---|---|
36 ErrorCode_PromiseSingleSuccessHandler, // a Promise can only have a single success handler | 36 ErrorCode_PromiseSingleSuccessHandler, // a Promise can only have a single success handler |
37 ErrorCode_PromiseSingleFailureHandler, // a Promise can only have a single failure handler | 37 ErrorCode_PromiseSingleFailureHandler, // a Promise can only have a single failure handler |
38 | 38 |
39 ErrorCode_CanOnlyAddOneLayerAtATime, | 39 ErrorCode_CanOnlyAddOneLayerAtATime, |
40 ErrorCode_CommandJsonInvalidFormat, | 40 ErrorCode_CommandJsonInvalidFormat, |
41 ErrorCode_WebGLContextLost, | |
41 ErrorCode_Last | 42 ErrorCode_Last |
42 }; | 43 }; |
43 | 44 |
44 | 45 |
45 | 46 |
61 | 62 |
62 virtual const char* What() const | 63 virtual const char* What() const |
63 { | 64 { |
64 return "TODO: EnumerationToString for StoneException"; | 65 return "TODO: EnumerationToString for StoneException"; |
65 } | 66 } |
67 }; | |
68 | |
69 class OpenGLContextLostException : public StoneException | |
70 { | |
71 public: | |
72 explicit OpenGLContextLostException(void* context) | |
73 : StoneException(ErrorCode_WebGLContextLost) | |
74 , context_(context) | |
75 { | |
76 } | |
77 virtual const char* What() const | |
78 { | |
79 return "The OpenGL/WebGL context has been lost!"; | |
80 } | |
81 void* context_; | |
66 }; | 82 }; |
67 | 83 |
68 class StoneOrthancException : public StoneException | 84 class StoneOrthancException : public StoneException |
69 { | 85 { |
70 protected: | 86 protected: |