diff --git a/src/ca/access.cpp b/src/ca/access.cpp index e4b359ca9..7b48b1a6e 100644 --- a/src/ca/access.cpp +++ b/src/ca/access.cpp @@ -631,15 +631,19 @@ extern "C" int epicsShareAPI ca_pend_event (ca_real timeout) return status; } - // preserve past odd ball behavior of waiting forever when - // the delay is zero - if ( timeout == 0.0 ) { - while ( true ) { - pcac->pendEvent ( 60.0 ); + try { + // preserve past odd ball behavior of waiting forever when + // the delay is zero + if ( timeout == 0.0 ) { + while ( true ) { + pcac->pendEvent ( 60.0 ); + } } + return pcac->pendEvent ( timeout ); + } + catch ( ... ) { + return ECA_INTERNAL; } - - return pcac->pendEvent ( timeout ); } /*