Changeset 5236 for trunk/upgrade.php


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.php

    r5234 r5236  
    5252
    5353// Database connection
    54 $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
    55                               $conf['db_password'], $conf['db_base']);
    56 pwg_select_db($conf['db_base'], $pwg_db_link);
     54try
     55{
     56  $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
     57                                $conf['db_password'], $conf['db_base']);
     58}
     59catch (Exception $e)
     60{
     61  my_error(l10n($e->getMessage(), true);
     62}
    5763
    5864pwg_db_check_charset();
Note: See TracChangeset for help on using the changeset viewer.