MongoDB::Error - MongoDB Driver Error classes
version v0.704.0.0
use MongoDB::Error; MongoDB::Error->throw("a generic error"); MongoDB::DatabaseError->throw( message => $string, result => $hashref, );
This class defines a heirarchy of exception objects.
MongoDB::Error->throw("message"); MongoDB::Error->throw( msg => "message", result => $data, ); MongoDB::Error->throw( $error_object );
All classes inherit from MongoDB::Error.
MongoDB::Error
All error classes have the attribute:
message — a text representation of the error
Errors related to network connections.
Errors related to database operations.
Attributes include:
result — response from a database command; this must impliement the last_errmsg method
last_errmsg
Errors indicating failure of a write command. The result attribute is a MongoDB::WriteResult object.
result
Errors indicating failure of a write concern. The result attribute is a MongoDB::WriteResult object.
Errors from documents exceeding the maximum allowable size.
document — the document that caused the error
David Golden <david.golden@mongodb.org>
Mike Friedman <friedo@mongodb.com>
Kristina Chodorow <kristina@mongodb.org>
Florian Ragwitz <rafl@debian.org>
This software is Copyright (c) 2014 by MongoDB, Inc..
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install MongoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MongoDB
CPAN shell
perl -MCPAN -e shell install MongoDB
For more information on module installation, please visit the detailed CPAN module installation guide.