[rt-users] Suppressing method error messages
Ruslan U. Zakirov
Ruslan.Zakirov at acronis.com
Fri Oct 22 13:31:38 EDT 2004
Mike Friedman wrote:
> Is there an easy way, in a perl script, to suppress error messages written
> by RT methods to STDERR? For example, inside a loop, I have something
> like this:
>
> $TicketNumber = $TicketObj->Load($i);
> next unless (defined $TicketNumber);
Why don't you RT::Tickets object instead?
>
> but if ticket number '$i' doesn't exist, I get an ugly message from the
> Ticket->Load method:
>
> [crit]: RT::Ticket=HASH(0x8c89988) tried to load a bogus ticket:
>
> when all I want to do is continue without printing anything. (In general,
> redirecting STDERR to /dev/null is not feasible, since I may want to write
> my own messages there and have them seen).
>
> Thanks.
>
> Mike
>
> ------------------------------------------------------------------------------
> Mike Friedman System and Network Security
> mikef at ack.Berkeley.EDU 2484 Shattuck Avenue
> 1-510-642-1410 University of California at Berkeley
> http://ack.Berkeley.EDU/~mikef http://security.berkeley.edu
> ------------------------------------------------------------------------------
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT wiki at http://wiki.bestpractical.com
More information about the rt-users
mailing list