Ethereal-dev: Re: [Ethereal-dev] Reaction of g_assert maybe too hard for buggy dissectors?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sun, 16 Jan 2005 17:09:22 -0800
Guy Harris wrote:

We could add an additional macro to allow the exception to be thrown with a user-defined string rather than an assertion failure string, so that we could, for example, show details of the sort reported for invalid field lengths. That shouldn't necessarily be required, though - there might be some assertions where the failed expression would include enough information to identify the bug, and, in those cases, just replacing "g_assert()" with "DISSECTOR_ASSERT()" should suffice.

I'll look at adding such a macro.

Done - it's REPORT_DISSECTOR_BUG(). That's now being used in "alloc_field_info()".