Fix path to the docs and improve error message

This commit is contained in:
Hannes Magnusson
2014-03-29 08:11:53 -07:00
parent 6954d4a952
commit ef00ee094f

View File

@ -31,7 +31,7 @@ include '../include/init.inc.php';
include '../include/lib_proj_lang.inc.php';
//$DOCS = SVN_DIR . 'phpdoc-all/';
$DOCS = SVN_DIR;
$DOCS = SVN_DIR . DOC_DIR . "/";
// Test the languages:
$LANGS = array_keys($LANGUAGES);
@ -447,12 +447,19 @@ if (is_file($tmp_db)) {
// 2 - Create the new database
$db = new SQLite3($tmp_db);
try {
$db = new SQLite3($tmp_db);
/* Didn't throw exception at some point? */
if (!$db) {
throw Exception("Cant open $tmp_db");
}
if (!$db) {
echo "Could not open $tmp_name";
} catch(Exception $e) {
echo $e->getMessage();
echo "Could not open $tmp_db";
exit;
}
$db->exec($CREATE);
// 3 - Fill in the description table while cleaning the langs
@ -484,4 +491,4 @@ copy($tmp_db, $db_name);
$time = microtime(true) - $time_start;
echo "Time of generation: $time s\n";
echo "End\n";
echo "End\n";