Re: postgres insert



Tom Allison am Donnerstag, 23. November 2006 16:13:

[snipped some code]
I get a STDERR warning printed out everytime this has a duplicate key
violation...

Any idea why eval{} doesn't suppress this?

Hi Tom

It'd be a bad idea... eval BLOCK adds the ability to catch runtime errors and
modify the default reaction to a die. It is not here to hide any problems of
code.

You can suppress the output of warnings at a certain place by f.ex:

#!/usr/bin/perl

use strict; use warnings;

warn "Test1\n";
{
local $SIG{__WARN__}=sub {}; # <<<<
warn "Test2\n";
}
warn "Test3\n";

__END__

output:

Test1
Test3

Dani [not part of the output...]
.



Relevant Pages

  • Re: How do I suppress warnings when using an Access MDB as a runti
    ... between the registry edit for the security key and a little added VB ... function to suppress the warnings, ...
    (microsoft.public.access.security)
  • Re: How do I suppress warnings when using an Access MDB as a runti
    ... > function to suppress the warnings, ... And you added a public VBA function to turn the warnings back on, ... >> The destination computer can have the macro security settings set to Low ...
    (microsoft.public.access.security)
  • Re: Link Warnings
    ... Used LDEFINES=$/IGNORE:4210 in appropriate SOURCES file, ... gets rid of 4210 warnings and others but will not suppress 4099. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Are compiler #Pragma equivalents supported in C#?
    ... This allows you to specify which warnings to not have ... There is a property "Suppress Specific ... > I'm looking for a way to suppress the CS0659 compiler warning message about> class overrides Equals but does not provide a GetHashCodeoverride. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: postgres insert
    ... Any idea why evaldoesn't suppress this? ... eval BLOCK adds the ability to catch runtime errors and modify the default reaction to a die. ...
    (perl.beginners)