• Armin Burgmeier's avatar
    Flush stderr buffer before calling zmq_abort in assert macros · 07a37435
    Armin Burgmeier authored
    On Windows, the written message does not seem to be guaranteed to be
    written to stderr, in particular when stderr is redirected to a file. I
    suppose this is because RaiseException terminates the process in a way
    that does not give the CRT a chance to flush stdio buffers (or if it
    does, there might be a problem when more than one CRT instance is linked
    into the program and they overwrite each other's exception handler). Either
    way, just make sure the assertion message ends up written to stderr to
    ease diagnostics.
    07a37435
err.hpp 5.32 KB