OK dudes! Now i'm understand why we can't use exceptions to handle to errors, but what you think we change the things in our favour. We can make replace the normal asset( ) from assert.h to a function that show us more details about what's happen, like a log file or a message window saying the __LINE__ and the source __FILE__ of the error, and after this we can call the real assert( )! What your opinion about that?

With best wishes,
Edson Alves Pereira


Adam Lock wrote:

Garth Wallace wrote:
>
> Carlfish wrote:
>
> >
> > Secondly, this is from http://www.mozilla.org/hacking/portable-cpp.html
> >
> > "Don't use exceptions.
> >
> > "Exceptions are another C++ feature which is not very widely implemented,
> > and as such, their use is not portable C++ code. Don't use
> > them. Unfortunately, there is no good workaround that produces similar
> > functionality.
>
> It's a damn shame too, they can be really handy.

Unfortunately in the COM/XPCOM world, exceptions are a major pain.
Unless you put try/catch blocks in all your interface implementations,
there's always a chance that the caller could be thrown one of your
exceptions. This is nasty especially because the caller and callee may
be written in two different languages and may not even share the same
thread or address space.

Compiling in exception handling also adds significantly to the size of
the binaries.

--
Adam Lock - [EMAIL PROTECTED]

Reply via email to