Add specific exception for invalid search type
[gitphp.git] / include / controller / Controller_Message.class.php
blob:a/include/controller/Controller_Message.class.php -> blob:b/include/controller/Controller_Message.class.php
--- a/include/controller/Controller_Message.class.php
+++ b/include/controller/Controller_Message.class.php
@@ -166,6 +166,12 @@
 			}
 		}
 
+		if ($exception instanceof GitPHP_InvalidSearchTypeException) {
+			if ($this->resource)
+				return $this->resource->translate('Invalid search type');
+			return 'Invalid search type';
+		}
+
 		return $exception->getMessage();
 	}
 

comments