[systemd-devel] Antw: [EXT] Re: [systemd‑devel] Exception safety od sd‑bus

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue Jul 27 06:53:29 UTC 2021


>>> Cristian Rodríguez <crrodriguez at opensuse.org> schrieb am 26.07.2021 um
21:45 in
Nachricht
<CAPBLoAfqx9ZirbfBhuPKgOLe9t0K5DtA+Ypp7mUZw4t50gA9cw at mail.gmail.com>:
> On Thu, Jul 22, 2021 at 9:16 AM Norbert Lange <nolange79 at gmail.com> wrote:
>>
> 
>> It should be "supported" in the way that exceptions will *not*
>> propagate in C libraries, and your program will call std::terminate
>> should one callback throw an exception.
>> Mark your callbacks with 'noexcept', statical analysis might be able
>> to warn if you potentially create exceptions.
> 
> Yes, and we should make c this fact clear to the compiler annotating
> sd‑* libraries'  functions with __attribute__((__nothow__) like glibc
> does.. however this will make headers uglier.

You can wrap an ugly extension into a macro.

> _______________________________________________
> systemd‑devel mailing list
> systemd‑devel at lists.freedesktop.org 
> https://lists.freedesktop.org/mailman/listinfo/systemd‑devel 





More information about the systemd-devel mailing list