com web/doc: Fix path to the docs and improve error message: scripts/rev.php

[email protected] (Hannes Magnusson)
Newsgroups php.doc.web
Message-ID <[email protected]>
Commit:    ef00ee094f7da301b0f85bb39c296aeff6e6e8b0
Author:    Hannes Magnusson <[email protected]>         Sat, 29 Mar 2014 08:11:53 -0700
Parents:   6954d4a9522795a0048a19473d356fe7a0efea9d
Branches:  master

Link:       http://git.php.net/?p=web/doc.git;a=commitdiff;h=ef00ee094f7da301b0f85bb39c296aeff6e6e8b0

Log:
Fix path to the docs and improve error message

Changed paths:
  M  scripts/rev.php


Diff:
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";
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.