This came up in a discussion between Nat Linden and me about how the viewer handles exceptions and how they can propagate out of coroutines.
Nat asked me to file this so someone with better knowledge about the topic can chime in and propose a change (if needed at all).
The function in question is initializeSecHandler (llsecapi.cpp) and there's this code we're both had not been sure how it should behave:
There is potentially (more of this later) N instances of LLSecAPIHandler that are getting initialized. If there would be N amount of exceptions happening, the final exception after the loop would only report the last failure (exception_msg is always overwritten in case of an exception).
This lead to a few questions:
- Shall the whole loop be aborted on the first exception and that error be reported?
- Or shall the errors be concactenated?
- Or, as there only ever seems to be a BASIC_SECHANDLER handler, maybe the whole loop should be removed and there is only need for one handler rather than a whole map?