Add specific exception for invalid search type
[gitphp.git] / include / controller / Controller_Search.class.php
blob:a/include/controller/Controller_Search.class.php -> blob:b/include/controller/Controller_Search.class.php
--- a/include/controller/Controller_Search.class.php
+++ b/include/controller/Controller_Search.class.php
@@ -103,7 +103,7 @@
 		}
 
 		if (($this->params['searchtype'] !== GitPHP_Controller_Search::AuthorSearch) && ($this->params['searchtype'] !== GitPHP_Controller_Search::CommitterSearch) && ($this->params['searchtype'] !== GitPHP_Controller_Search::CommitSearch) && ($this->params['searchtype'] !== GitPHP_Controller_Search::FileSearch)) {
-			throw new GitPHP_MessageException(__('Invalid search type'), true);
+			throw new GitPHP_InvalidSearchTypeException();
 		}
 
 		if ((!isset($this->params['search'])) || (strlen($this->params['search']) < 2)) {

comments