Task #1044 - Implementation de Test
Replace in class exit by throw new Exception
This commit is contained in:
parent
518a9090d6
commit
54b6037ede
37 changed files with 95 additions and 104 deletions
|
|
@ -99,7 +99,7 @@ class Database
|
|||
echo "Utilisateur : $noalyss_user <br>";
|
||||
echo '</p>';
|
||||
|
||||
exit("Connection impossible : vérifiez vos paramètres de base
|
||||
die("Connection impossible : vérifiez vos paramètres de base
|
||||
de données");
|
||||
}
|
||||
else
|
||||
|
|
@ -264,8 +264,7 @@ class Database
|
|||
$hf=fopen($script, 'r');
|
||||
if ($hf==false)
|
||||
{
|
||||
echo 'Ne peut ouvrir '.$script;
|
||||
exit();
|
||||
throw new Exception ( 'Ne peut ouvrir '.$script);
|
||||
}
|
||||
$sql="";
|
||||
$flag_function=false;
|
||||
|
|
@ -327,7 +326,7 @@ class Database
|
|||
if (!DEBUG)
|
||||
ob_end_clean();
|
||||
print "ERROR : $sql";
|
||||
exit();
|
||||
throw new Exception("ERROR : $sql");
|
||||
}
|
||||
$sql="";
|
||||
$flag_function=false;
|
||||
|
|
@ -619,7 +618,7 @@ class Database
|
|||
break;
|
||||
default:
|
||||
echo_error(__FILE__." format_name invalid type ".$p_type, __LINE__);
|
||||
exit();
|
||||
throw new Exception(__FILE__." format_name invalid type ".$p_type. __LINE__);
|
||||
}
|
||||
return $sys_name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue