Changeset 82433 in spip-zone


Ignore:
Timestamp:
May 16, 2014, 4:50:17 AM (5 years ago)
Author:
fil@…
Message:

afficher l'erreur de connexion PDO le cas echeant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/indexer/trunk/prive/squelettes/contenu/indexer.html

    r82428 r82433  
    77$indexer = new Indexer\Indexer();
    88
     9try {
    910$indexer->registerStorage(
    1011    new Indexer\Storage\Sphinx(
    1112        new Sphinx\SphinxQL(SPHINX_SERVER_HOST, SPHINX_SERVER_PORT), SPHINX_DEFAULT_INDEX)
    1213);
    13 
     14} catch( PDOException $e ) {
     15    if (!$message = $e->getMessage())
     16        $message = _L('Erreur inconnue');
     17    die("<p class='erreur'>$message</p>");
     18}
    1419
    1520$sources = new Indexer\Sources\Sources();
Note: See TracChangeset for help on using the changeset viewer.