Any ideas?
On Tue, Sep 8, 2015 at 9:25 PM, Andrey Khozov <[email protected]>
wrote:
> Example:
>
> $db->query('create table x (n integer unique)');
> $db->query('insert into x values (23)');
>
> eval {
> my $tx = $db->begin;
> $db->query('insert into x values (23)');
> $tx->commit;
> };
> if ($@) {
> say $@;
> say $db->dbh->state; # Empty, $dbh->rollback clear a real error.
> }
>
> What is the way to find out the error code for dbh? (
> http://www.postgresql.org/docs/9.4/static/errcodes-appendix.html)
> After the destruction $tx, $db->dbh->state is set to udnef because of the
> rollback.
>
> --
> Andrey Khozov
>
--
Андрей Хозов
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.