Alex,

Is it documented somewhere?

пн, 11 апр. 2022 г. в 18:45, Alex Peshkoff via Firebird-devel
<firebird-devel@lists.sourceforge.net>:
>
> On 4/11/22 17:56, Dimitry Sibiryakov wrote:
> > Vasiliy Yashkov wrote 11.04.2022 16:52:
> >> What is the right way to throw an exception?
> >
> >   Plugins (as any other DLL) is not supposed to throw exceptions ever.
> >
>
> Yes, throwing directly (like in your code) is impossible. But there is a
> way to return an exception information from plugin using Status
> interface, which is passed as first parameter in that case.
> Pay attention - FB_PLUGIN_ENTRY_POINT has no such parameter and
> therefore is not expected to return exception information. (there are
> more reasons why exceptions not to be used in that call but let me not
> dive too deep here)
>
> But if some plugin entry has first Status parameter you can throw
> FbException in it, it will be caught by thin API layer which actually
> invoked your plugin entry and delivered to the code which called plugin.
>
>
>
>
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel



-- 
Роман Симаков


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to