Re: async-calls squid3/src Debug.h,1.10.4.4,1.10.4.5...

From: Tsantilas Christos <chtsanti@dont-contact.us>
Date: Mon, 17 Mar 2008 21:20:42 +0200

Hi Alex,

Alex Rousskov wrote:
> On Sun, 2008-03-16 at 15:43 +0000, chtsanti wrote:
>> Update of cvs.devel.squid-cache.org:/cvsroot/squid/squid3/src
> ...
>> The xThrow function is similar to the old Throw function but in addition adds
>> an extra check to see if the carrent call can handle exceptions or not. In the
>> second case aborts imediatally squid.
>
> Christos,
>
> AFAICT, this change prevents code from using try/catch blocks
> outside of jobs that handle exceptions. I am not sure that is a good
> idea.
>
Yes, I knew it, but ....
In the current squid code the only place used a "try/catch" block is
inside the "ICAPModXact::callException" method which when called the
"AsyncCall_Handling_Exceptions" is always true. Moreover at the
(very-very) long-term scenario most of the squid code should run inside
 protected AsyncJob. This is why I decided to add the xThrow function..

But OK, there is not any reason for this now. Even if there is not any
problem right now, the xThrow maybe disables the use of "try/catch" in
future works...

> I would just let Throw() throw (i.e., undo this change) until we have
> more experience with this. Uncaught exceptions will kill Squid, which is
> what we want. It would be better to catch them at the top/main() level
> and print an intelligent debugging message, but that can wait.
>

OK, I will undo the change.
Received on Mon Mar 17 2008 - 13:21:24 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Apr 01 2008 - 13:00:10 MDT