in reply to want to skip displaying of "DBD::Oracle::st execute failed:" error messages showing full query

See DBI->connect and its parameters. Most likely, you want to construct your database handle as:

my $dbh= DBI->connect($dsn, $user, $password, { PrintError => 0, Raise +Error => 1 } );
  • Comment on Re: want to skip displaying of "DBD::Oracle::st execute failed:" error messages showing full query
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: want to skip displaying of "DBD::Oracle::st execute failed:" error messages showing full query
by sumalatha (Novice) on Apr 07, 2015 at 11:41 UTC

    Tied connecting to DBI as per user response. But still me getting the Software Error Statement displaying on screen.

    i want only content given in die to be displayed whenever there is any error.

    Please help me.

      Maybe you want to also set RaiseError to zero. But I really recommend first reading and understanding the documentation.

        From DBI:

        ShowErrorStatement Type: boolean, inherited The ShowErrorStatement attribute can be used to cause the relevant Statement text to be appended to the error messages generated by the RaiseError, PrintError, and PrintWarn attributes. Only applies to errors on statement handles plus the prepare(), do(), and the various select*() database handle methods. (The exact format of the appended text is subject to change.) If $h->{ParamValues} returns a hash reference of parameter (placeholder) values then those are formatted and appended to the end of the Statement text in the error message.
        So instead of RaiseError and/or PrintError you need to work with ShowErrorStatement. That might remove the need to use the eval approach below if that is not appealing.

        You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.