Re: Exception safety od sd-bus

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

 



Am Do., 22. Juli 2021 um 14:04 Uhr schrieb Stanislav Angelovič
<angelovic.s@xxxxxxxxx>:
>
> Hi guys!
>
> Assuming sd-bus is used in a C++ application, is sd-bus safe against exceptions flying from e.g. a sd-bus vtable callback handler (provided by the C++ application) and catching them in the caller of sd_bus_process() (which is the same C++ app)?
>
> Or this is not supported (so leaks or whatever obscure situations may happen then)?

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.

Norbert
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux