Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jonasbn (1153)

  reversethis-{gro.napc} {ta} {nbsanoj}
AOL IM: BJonasN (Add Buddy, Send Message)

Perl Programmer located in Copenhagen, Denmark. Active member of Copenhagen Perl Mongers.

Author of:

  • Business::DK::CPR
  • Business::DK::CVR
  • Business::DK::PO
  • Business::OnlinePayment::CashCow
  • Date::Holidays
  • Date::Holidays::Abstract
  • Date::Holidays::Super
  • Date::Pregnancy
  • Games::Bingo
  • Games::Bingo::Bot
  • Games::Bingo::Print
  • Module::Info::File
  • Module::Template::Setup
  • Test::Timer

and maintainer of:

  • Tie::Tools
  • XML::Conf
  • Workflow

Journal of jonasbn (1153)

Monday June 02, 2003
02:23 PM

Transaction Problems

[ #12565 ]

I ran into a serious obstacle today using Perl, DBI and DBD::Oracle and PL/SQL.

I have a PL/SQL package where I raise an exception:

raise_application_error(-20002, 'No email address exists');

I then want to handle the exception in Perl - and ignoring it, considering the exception of type -20002 only a warning.


$dbh->{HandleError} = sub {
        print STDERR $sth2->errstr ."\n" if $verbose;
        $dbh->set_err(0,"") if $_[1]->err == 20002;


if (($dbh->err) and ($dbh->err != 20002)) {
        print STDERR "Could not provision profile for: $row[0]/$row[1]\n";
        print STDERR $sth2->errstr ."\n" if $verbose;
} else {
        print STDERR "Provisioning profile for: $row[0]/$row[1]\n";

But apparently this is not possible - the transaction seemed to become invalidated...

Most irritating I cannot decide how to handle the exception myself :-/

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.