From 6053bbf9ca17fe487f02d5d22bdf0404df3380e6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 29 Jan 2010 12:54:09 -0700 Subject: [PATCH] More proper way of throwing error --- framework/Core/lib/Horde/Registry.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 78d0a6e08..242bfa6d0 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -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, -- 2.11.0