ElasticSearch::Error - Exception objects for ElasticSearch
ElasticSearch::Error is a base class for exceptions thrown by any ElasticSearch code.
There are several exception subclasses, which indicate different types of error. All of them inherit from ElasticSearch::Error, and all include:
$error->{-text} # error message $error->{-file} # file where error was thrown $error->{-line} # line where error was thrown
They may also include:
$error->{-vars} # Any relevant variables related to the error $error->{-stacktrace} # A stacktrace, if $ElasticSearch::DEBUG == 1
Error objects can be stringified, and include all of the above information in the string output.
ElasticSearch::Error::Param
An incorrect parameter was passed in
ElasticSearch::Error::Timeout
The request timed out
ElasticSearch::Error::Connection
There was an error connecting to the current server
ElasticSearch::Error::Request
There was some other error performing the request
ElasticSearch::Error::Conflict
There was a versioning conflict while performing an index/create/delete operation. ElasticSearch::Error::Conflict inherits from ElasticSearch::Error::Request.
ElasticSearch::Error::Missing
Tried to get/delete a document or index that doesn't exist. ElasticSearch::Error::Missing inherits from ElasticSearch::Error::Request.
ElasticSearch::Error::NoServers
No servers are available
ElasticSearch::Error::JSON
There was an error parsing a JSON doc
ElasticSearch::Error::Internal
An internal error - you shouldn't see these
Copyright 2010 - 2011 Clinton Gormley.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install ElasticSearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ElasticSearch
CPAN shell
perl -MCPAN -e shell install ElasticSearch
For more information on module installation, please visit the detailed CPAN module installation guide.