schotime / NPoco

Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco
Apache License 2.0
848 stars 302 forks source link

Why isn't DBConcurrencyException sent to IExceptionInterceptor?" #697

Open fravalpin opened 9 months ago

fravalpin commented 9 months ago

First of all, congratulations on the work being done here.

I've added an IExceptionInterceptor but I see that, for example, the DBConcurrencyException is not redirected to the interceptors. Is there a reason for this? Is it possible to add it in one of the future versions (I would even dare to say why not all possible exceptions)?

This happens in the Database class. The exception is thrown without going through OnExceptionInternal.

Thank you!

schotime commented 9 months ago

Its because it happens after the statements have executed and only db executed statements are forwarded onto the IExceptionInterceptor at the moment.