Open kzangeli opened 10 years ago
In which normal situation the function is called? I mean, which client request would produce invoking such function?
It is a 'crazy situation', one that should never happen. Like
x = 2;
if (x != 2)
exit():
but much more complex of course. It's about compound values of attributes and it occurs if there was no 'previous' attribute (there must be a previous attribute, otherwise we wouldn't be treating the value of an attribute).
orion is a daemon and should never die. Especially not on purpose. When compiled in debug mode we need it to be able to die gracefully to measure memory leaks using valgrind. Also, during unit tests we need to capture these exits and therefore we created a function to be called on exit, named orionExit (in contextBroker.cpp - there is another function in unitTest.cpp).
I just discovered that we call the orion exit function from a 'normal situation' - compoundValue.cpp. This call can occur in a broker compiled for production and this is not good. Instead of calling the orion exit function in compoundValue.cpp, we should try to return an error over REST.
Effort: 1 man day