From: Michael M Slusarz Date: Fri, 29 Jan 2010 19:54:09 +0000 (-0700) Subject: More proper way of throwing error X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6053bbf9ca17fe487f02d5d22bdf0404df3380e6;p=horde.git More proper way of throwing error --- 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,