Ignore:
Timestamp:
Mar 21, 2010, 11:51:36 PM (14 years ago)
Author:
nikrou
Message:

Feature 1255 :
only one function
use exceptions to deal with differents possible errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/upgrade_feed.php

    r5230 r5236  
    5555// |                         Database connection                           |
    5656// +-----------------------------------------------------------------------+
    57 
    58 $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
    59                               $conf['db_password'], $conf['db_base']);
    60 pwg_select_db($conf['db_base'], $pwg_db_link);
     57try
     58{
     59  $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
     60                                $conf['db_password'], $conf['db_base']);
     61}
     62catch (Exception $e)
     63{
     64  my_error(l10n($e->getMessage(), true);
     65}
    6166
    6267pwg_db_check_charset();
Note: See TracChangeset for help on using the changeset viewer.