Ethereal-dev: Re: [Ethereal-dev] dissect_ndr_pointer prototype implementation

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: Fri, 25 Jan 2002 00:39:13 -0800
On Wed, Jan 23, 2002 at 09:47:32PM +1100, Ronnie Sahlberg wrote:
> first, there is a spot where i would like to rise an exception and abort
> dissectong the packet marked with a comment.
> how would I generate an exception here?

With THROW.

However, you should throw an exception only if further dissection of
*anything* in the packet is impossible - other than subsequent PDUs in
the TCP byte stream.

In the case of subsequent PDUs in the TCP byte stream, the NBSS
dissector catches the ReportedBoundsError exception, reports a malformed
packet, and returns so that subsequent PDUs can be dissected.

If you add a new type of exception, it should catch those as well.