Property definitions

mongodb $ MongoError :: defaultinit
# 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