in reply to Re: Re: Re: script dies with 'broken pipe'-message, even in eval
in thread script dies with 'broken pipe'-message, even in eval

Hi,

I'm sorry, the '$dbh->execute' was a typo, I fixed it in the original question.

My $dbh is initialised like this:

$dbh = DBI->connect($sql_dsn, $sql_schema, $sql_auth); $dbh->{LongReadLen} = $LongReadLen;
Don't think the LongReadLen has anything to do with this.

I haven't tried using RaiseError, but then the question still remains why my eval doesn't trap the 'broken pipe' error? I don't want my program to die that easily on me.

  • Comment on Re: Re: Re: Re: script dies with 'broken pipe'-message, even in eval
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: script dies with 'broken pipe'-message, even in eval
by mifflin (Curate) on May 25, 2004 at 21:10 UTC
    Using eval to try and catch errors with DBI code is useless unless you set RaiseError on.
    Try that and possibly something like...
    local $SIG{PIPE} = sub {die "Unable to execute"};
    before the execute you know is going to fail.