removing SAL_THROW

Stephan Bergmann sbergman at redhat.com
Tue Jun 3 08:10:54 PDT 2014


On 06/03/2014 02:24 PM, Noel Grandin wrote:
> Any objections to doing a mass remove of SAL_THROW?
>
> It is defined at
> http://opengrok.libreoffice.org/xref/core/include/sal/types.h#350
>
> which says:
>
> /** Exception specification documentation.
>
>      The original intent of this macro was to control whether or not actual
>      exception specifications are emitted, based on how much they impact
> code
>      size etc. in a specific scenario.  But it ended up always being
> disabled
>      (except for MSVC, which effectively ignored it even though being
> enabled),
>      and used in ways that would make enabling it illegal (e.g., in the
>      cppu::ComponentFactoryFunc typedef, or with necessarily incomplete
>      com::sun::star::uno::RuntimeException in
> com/sun/star/uno/Reference.h), so
>      has officially been demoted to pure documentation now.
>
>      @deprecated do not use in new code.
> */
> #define SAL_THROW(x)
>
>
> i.e. it's not doing anything useful.

...besides serving as documentation (using some glorified syntax) of 
what certain functions may actually throw (or what somebody once thought 
they might).

In the end, I would be fine either way, keeping them or removing them.

Stephan


More information about the LibreOffice mailing list