[reSIProcate] [reSIProcate-commit] resiprocate 7261 bcampen: Have LazyParser::isWellFormed catch all exception types.

Jason Fischl jason at counterpath.com
Wed Sep 26 12:41:55 CDT 2007


This approach is fine. I think the typedef is key since there is lots of app
code that would break otherwise.

Jason


On 9/26/07, Byron Campen <bcampen at estacado.net> wrote:
>
> You know what, I'm just going to change ParseException to match the
> behavior of ParseBuffer::Exception, and remove ParseBuffer::Exception.
> (Maybe I can leave a "typedef ParseException Exception;" in
> ParseBuffer.hxx to maintain compatibility with existing app code; what do
> you think?) There are lots of places in the code that assume parse failures
> throw a ParseBuffer::Exception, and we can expect that this mistake will be
> made again in the future if we aren't proactive now.
>
> Best regards,
> Byron Campen
>
>
> If we can guarantee that all parsing exceptions will be of a common class
> (or a small number of classes), I am all for this. However, I discovered
> lately that there is at least one additional exception that is thrown by
> some of the parameter classes (ParseException). For the time being, I have
> clamped down completely. If we could move ParseException.hxx to rutil, and
> derive ParseBuffer::Exception from it (or just have ParseBuffer throw a
> plain-old ParseException), we'd (hopefully) be back to having a single
> exception class to serve our parse-failure needs.
>
> Best regards,
> Byron Campen
>
> I'm not sure that I agree with this particular change. isWellFormed should
> only catch parse exceptions. Any other exception can't be handled in this
> context and should be passed up. Is there a specific situation that you are
> trying to guard against here?
>
> On 9/25/07, svn at resiprocate.org <svn at resiprocate.org> wrote:
> >
> >  ProjectresiprocateNew Revision7261<http://svn.resiprocate.org/viewsvn/resiprocate?view=rev&rev=7261>
> > Committerbcampen (Byron Campen)Date2007-09-25 09:53:49 -0500 (Tue, 25
> > Sep 2007) Log
> >
> >  Have LazyParser::isWellFormed catch all exception types.
> >
> >
> >
> > Modified:
> >
> >    - main/resip/stack/LazyParser.cxx
> >    <http://svn.resiprocate.org/viewsvn/resiprocate/main/resip/stack/LazyParser.cxx?r1=7260&r2=7261&diff_format=l>
> >
> >
> > _______________________________________________
> > resiprocate-commit mailing list
> > resiprocate-commit at resiprocate.org
> > https://list.resiprocate.org/mailman/listinfo/resiprocate-commit
> >
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20070926/7ec72f5d/attachment.htm>


More information about the resiprocate-devel mailing list