MAINT-6584: Clarify LLKDUMessageError::flush() throwing exception.

master
Nat Goodspeed 2016-08-05 14:02:12 -04:00
parent f459c67fae
commit 65d608cdac
1 changed files with 6 additions and 0 deletions

View File

@ -165,6 +165,12 @@ struct LLKDUMessageError : public LLKDUMessage
// terminating handler→flush call."
// So throwing an exception here isn't arbitrary: we MUST throw an
// exception if we want to recover from a KDU error.
// Because this confused me: the above quote specifically refers to
// the kdu_error class, which is constructed internally within KDU at
// the point where a fatal error is discovered and reported. It is NOT
// talking about the kdu_message subclass passed to
// kdu_customize_errors(). Destroying this static object at program
// shutdown will NOT engage the behavior described above.
if (end_of_message)
{
throw "KDU throwing an exception";