History: Exceptions In C Plus Plus: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
Line 1: Line 1:
Why we don't use exceptions in our code


As told by Mike Shaver to Dave Liebreich, 5-Dec-2005
some of the reasons exceptions are not used are:
* problems with older compilers' implementation of exceptions.  This reason will go away as we drop support for older compilers over time.
* problems with exceptions that have to cross boundaries between C, C++, and/or XPCOM.
* lots of the existing code is not exception-safe.
C++ templates are slowly being adopted, so it's not like we never use different stuff.
[[category:mozilla History|exceptions]]

Latest revision as of 22:39, 15 November 2006

Why we don't use exceptions in our code

As told by Mike Shaver to Dave Liebreich, 5-Dec-2005


some of the reasons exceptions are not used are:

  • problems with older compilers' implementation of exceptions. This reason will go away as we drop support for older compilers over time.
  • problems with exceptions that have to cross boundaries between C, C++, and/or XPCOM.
  • lots of the existing code is not exception-safe.

C++ templates are slowly being adopted, so it's not like we never use different stuff.