http://www.perlmonks.org?node_id=1174180


in reply to Capture Elasticsearch Scroll Error

Hi,
First off, you'll be better advised to place the error message inside <code></code> tags, as it's horribly hard to read, as well as breaking the entire page.

As for your question, if you are looking into capturing the error, as in "catching" it, either look into eval, or perhaps something more familiar like Try::Tiny

Principle of Least Astonishment: Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert