Comment 1 for bug 697516

Revision history for this message
Jeff Hill (johill-lanl) wrote :

maybe this is fixed in recent EPICS. I see code like this which seems to handle that exception?

void epicsThread :: printLastChanceExceptionMessage (
    const char * pExceptionTypeName,
    const char * pExceptionContext )
{
    char date[64];
    try {
        epicsTime cur = epicsTime :: getCurrent ();
        cur.strftime ( date, sizeof ( date ), "%a %b %d %Y %H:%M:%S.%f");
    }
    catch ( ... ) {
        strcpy ( date, "<UKN DATE>" );
    }
    char name [128];
    epicsThreadGetName ( this->id, name, sizeof ( name ) );
    errlogPrintf (
        "epicsThread: Unexpected C++ exception \"%s\" "
        "with type \"%s\" in thread \"%s\" at %s\n",
        pExceptionContext, pExceptionTypeName, name, date );
    errlogFlush ();
    // this should behave as the C++ implementation intends when an
    // exception isnt handled. If users dont like this behavior, they
    // can install an application specific unexpected handler.
    std::unexpected ();
}