Add specific exception for project list file read failure
[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
@@ -220,6 +220,12 @@
 			return sprintf('%1$s is not a git repository', $exception->Repository);
 		}
 
+		if ($exception instanceof GitPHP_ProjectListFileReadException) {
+			if ($this->resource)
+				return sprintf($this->resource->translate('Failed to open project list file %1$s'), $exception->File);
+			return sprintf('Failed to open project list file %1$s', $exception->File);
+		}
+
 		return $exception->getMessage();
 	}
 

comments