Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Catch XML error

by kyle (Abbot)
on Jul 13, 2007 at 23:31 UTC ( [id://626548]=note: print w/replies, xml ) Need Help??


in reply to Re: Catch XML error
in thread Catch XML error

Note that the eval will catch all errors, not just this one. It might be prudent to look at the contents of $@ (see perlvar) to see if the error you caught is really the one you want to skip silently.

my $value; eval { $value = $record1->getAttribute('value1'); }; if ( $@ ) { next FILE if ( $@ =~ /^duplicate attribute/ ); die $@; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://626548]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-18 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found