Hi,

I am trying to catch exception that raises when Mojo::DOM cannot find
anything at specified location.

For example, when I run:
$content = $dom->at('html body div#ja-contents > table + table > tr > td') ;

I am getting exception page with following error: [...]Can't call
method "find" on an undefined value at
script/../lib/Cms/Admin.pm line 934.[...]

When I am trying:

eval {
$content = $dom->at('html body div#ja-contents > table + table > tr > td') ;
}
or do {
$self->render(text => Dumper($@));
return;
};

The string is just empty.
Is there is anyway to render as text only error message that I am
getting without eval?

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to