More proper way of throwing error
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 29 Jan 2010 19:54:09 +0000 (12:54 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 29 Jan 2010 23:30:20 +0000 (16:30 -0700)
framework/Core/lib/Horde/Registry.php

index 78d0a6e..242bfa6 100644 (file)
@@ -145,8 +145,7 @@ class Horde_Registry
         if ($args['cli']) {
             /* Make sure no one runs from the web. */
             if (!Horde_Cli::runningFromCLI()) {
-                fwrite(STDERR, "Must be run from the command line\n");
-                exit(1);
+                throw new Horde_Exception('Script must be run from the command line');
             }
 
             /* Load the CLI environment - make sure there's no time limit,