[Dbix-class] Proper way to suppress die from DBIx::Class
Sean Quinlan
spq.easy at gmail.com
Wed Oct 15 14:55:46 GMT 2014
The end result I want is to not have to wrap every update / insert / etc
with an eval.
I have no problem if DBIC internals use exception-based control internally.
I just want to optionally have it not bubble up to the level of my
application. It would be far more elegant if I could have DBIC play nicely
with our applications exception handling, rather than have to insulate
every usage manually.
-Thanks.
Sean
On Sat, Oct 4, 2014 at 2:52 PM, Peter Rabbitson <rabbit+dbic at rabbit.us>
wrote:
> On 10/01/2014 08:51 PM, Sean Quinlan wrote:
>
>> Greetings all!
>>
>> Our application has its own internal exception handling that we would
>> like to be able to use when interacting with the database through
>> DBIx::Class. I would prefer to do this in a way that does not require
>>
> > ...
>
>> using evals all over >>
>> And regardless, no matter what I try to do, I don't seem to be able to
>> suppress the die! Setting RaiseError to 0 and unsafe to 1 on connection
>> does not appear to have any impact (though the documentation seemed to
>> indicate it would).
>>
>
>
> I am not sure I understand the exact goal you are pursuing here. Note that
> trapping and *neutralizing* all exceptions is not possible - DBIC internals
> use exception-based control flow at places.
>
> Can ou please step away from describing the exact implementation you are
> trying to achieve, and re-explain what is the *end result* you are after.
>
> Thanks!
>
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/
> dbix-class at lists.scsys.co.uk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20141015/add8576c/attachment.htm>
More information about the DBIx-Class
mailing list