Within the client, if a method returns false
or null
it's more likely that
an error occured during the execution.
See MongoClient::last_error
.
mongodb :: MongoError :: defaultinit
mongodb :: MongoError :: domain
Logical domain within a library that created the error.mongodb $ MongoError :: SELF
Type of this instance, automatically specialized in every classcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
mongodb :: MongoError :: defaultinit
mongodb :: MongoError :: domain
Logical domain within a library that created the error.core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).
# An error returned by the mongoc client.
#
# Within the client, if a method returns `false` or `null` it's more likely that
# an error occured during the execution.
#
# See `MongoClient::last_error`.
class MongoError
private var native: BSONError
# Logical domain within a library that created the error.
fun domain: Int do return native.domain
# Domain specific error code.
fun code: Int do return native.code
# Human readable error message.
fun message: String do
var ns = native.message
var res = ns.to_s
ns.free
return res
end
redef fun to_s do return "{message} (code: {code})"
end
lib/mongodb/mongodb.nit:136,1--161,3