Re: Is it a good idea to continue after Assertion fail?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+  if (env != NULL){
+    throw std::runtime_error(msg);
+  }

What does it do if there is an exception handler that says Ignore?
It seems that the code should be:

+  if (env != NULL){
+    throw std::runtime_error(msg);
+    return;
+  }

Vyacheslav Frolov wrote:

OK. Now with PWLIB_ASSERT_EXCEPTION it do Core dump (if no exception handler).

What about to do it more flexible?
For example replace PWLIB_ASSERT_EXCEPTION by
PWLIB_ASSERT_ACTION={A[bort]|C[ore dump]|I[gnore]|T[hrow exception]|D[ebug]}

BTW:
+    PError << "\n<A>bort, <C>ore dump, <I>gnore <T>hrow exception"
                                                ^ missing ','



frederic heem wrote:

Hi,
Please see patch at http://sourceforge.net/tracker/index.php?func=detail&aid=1602184&group_id=80674&atid=560614 By the way, is there any document that lists all environment variables used by pwlib
Frederic Heem

On Wednesday 22 On Wednesday 22 November 2006 6:04 pm, Vyacheslav Frolov wrote:

Hello,

>>>>> 2006/11/14 12:26:28.670 H323 Cleaner    PWLib   Assertion fail:
>>>>> Transmit media thread did not terminate, file channels.cxx, line
>>>>> 708, Error=107
>>>>> 2006/11/14 12:26:28.671 H323 Cleaner    PWLib   Forcing
>>>>> termination of
>>>>> thread 0x2aaaaac250a0

...

-------- src/ptlib/unix/assert.cxx
  // Check for if stdin is not a TTY and just ignore the assert if so.
  if (!isatty(STDIN_FILENO)) {
    inAssert = FALSE;
    return;
  }
--------

IMHO it's better to "_exit(1)" or get default action from environment.

Regards,

Vyacheslav.

------------------------------------------------------------------------
Check the FAQ before asking! - http://www.openh323.org/~openh323/fom.cgi
The OpenH323 Project mailing list, using Mailman. To unsubscribe or
change your subscription options, goto
http://www.openh323.org/mailman/listinfo/openh323
Maintained by Quicknet Technologies, Inc - http://www.quicknet.net
------------------------------------------------------------------------


------------------------------------------------------------------------
Check the FAQ before asking! - http://www.openh323.org/~openh323/fom.cgi
The OpenH323 Project mailing list, using Mailman. To unsubscribe or
change your subscription options, goto
http://www.openh323.org/mailman/listinfo/openh323
Maintained by Quicknet Technologies, Inc - http://www.quicknet.net
------------------------------------------------------------------------


------------------------------------------------------------------------
Check the FAQ before asking! - http://www.openh323.org/~openh323/fom.cgi
The OpenH323 Project mailing list, using Mailman. To unsubscribe or
change your subscription options, goto
http://www.openh323.org/mailman/listinfo/openh323
Maintained by Quicknet Technologies, Inc - http://www.quicknet.net
------------------------------------------------------------------------

[Index of Archives]     [IETF SIP]     [Gnu Gatekeeper]     [Asterisk PBX]     [Asterisk SS7]     [Fedora Linux]     [Gimp]     [Yosemite News]     [Yosemite Campsites]     [ISDN Cause Codes]

  Powered by Linux