From ef00ee094f7da301b0f85bb39c296aeff6e6e8b0 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Sat, 29 Mar 2014 08:11:53 -0700 Subject: [PATCH] Fix path to the docs and improve error message --- scripts/rev.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/rev.php b/scripts/rev.php index 9bd65c5..15f4af0 100644 --- a/scripts/rev.php +++ b/scripts/rev.php @@ -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"; \ No newline at end of file +echo "End\n";