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

Re: ppThrow () flaws



Matt Slot wrote:

>The if..else cases of most macros tend to be delicate. I use:
>
>#ifdef DEBUG
>  #define MyThrow(x,y)  do { printf("failure %ld : %s\n", x, y); } while(0)
>#else
>  #define MyThrow(x,y)  do { } while(0)
>#endif

The problem in my case is that the macro either has to be evaluated to a
"throw (...);" (no problem) or to a "return xxx;" with xxx being of the
correct return type. A solution would be to give that "xxx" to ppTrow in
addition to the normal parameters, but that's IMHO ugly.


Cu
	Christian
--

Drive C: not found (A)bort (R)etry (P)arty because you have Linux installed