PHP Class Alcaeus\MongoDbAdapter\ExceptionConverter

Show file Open project: alcaeus/mongo-php-adapter Class Usage Examples

Public Methods

Method Description
toLegacy ( MongoDB\Driver\Exception\Exception $e, string $fallbackClass = 'MongoException' ) : MongoException
toResultArray ( MongoDB\Driver\Exception\Exception $e ) : array Converts an exception to

Method Details

toLegacy() public static method

public static toLegacy ( MongoDB\Driver\Exception\Exception $e, string $fallbackClass = 'MongoException' ) : MongoException
$e MongoDB\Driver\Exception\Exception
$fallbackClass string
return MongoException

toResultArray() public static method

Converts an exception to
public static toResultArray ( MongoDB\Driver\Exception\Exception $e ) : array
$e MongoDB\Driver\Exception\Exception
return array