From 177419e1059f8195b2eaac2a300e6f900d0cb563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Tue, 22 Jul 2014 14:39:43 +0800 Subject: [PATCH] Minor bug fixes --- php/astropenguin/botanical/RegRename.php | 10 ++++---- php/astropenguin/package.php | 31 ++++++++++++++++++++++++ php/regRename.php | 11 +++------ 3 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 php/astropenguin/package.php diff --git a/php/astropenguin/botanical/RegRename.php b/php/astropenguin/botanical/RegRename.php index d375bdd..fbac369 100644 --- a/php/astropenguin/botanical/RegRename.php +++ b/php/astropenguin/botanical/RegRename.php @@ -203,18 +203,18 @@ class RegRename try { if(count($this->searchDirs) == 0) - throw new Exception("Search directory is missing"); + throw new \Exception("Search directory is missing"); else if(count($this->patterns) == 0) - throw new Exception("Search pattern is missing"); + throw new \Exception("Search pattern is missing"); else if(count($this->replaceStrs) == 0) - throw new Exception("Replacement string is missing"); + throw new \Exception("Replacement string is missing"); else if(count($this->replaceStrs) != count($this->patterns)) - throw new Exception("Replacement string and pattern count not match"); + throw new \Exception("Replacement string and pattern count not match"); } - catch(Exception $e) + catch( \Exception $e ) { var_dump( $GLOBALS ); die("Error: $e.\n"); diff --git a/php/astropenguin/package.php b/php/astropenguin/package.php new file mode 100644 index 0000000..ba4578c --- /dev/null +++ b/php/astropenguin/package.php @@ -0,0 +1,31 @@ +