Skip to content

Commit bd71044

Browse files
committed
Catch builder exception and return Void pool
1 parent 94a38cc commit bd71044

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/PoolFactory.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ public function get( $type, array $config = array() ) {
2525
/** @var PoolBuilderInterface $builder */
2626
$builder = new $class_name();
2727

28-
return $builder->create( $config );
28+
try {
29+
$pool = $builder->create( $config );
30+
} catch( \Exception $e ) {
31+
$pool = new VoidCachePool();
32+
}
33+
34+
return $pool;
2935
}
3036
}

0 commit comments

Comments
 (0)