diff options
author | yorah <yoram.harmelin@gmail.com> | 2013-01-24 19:31:18 +0400 |
---|---|---|
committer | yorah <yoram.harmelin@gmail.com> | 2013-01-24 19:31:18 +0400 |
commit | 8580f18edfd311e5f16d795a4a533c59df88a758 (patch) | |
tree | 3af8e1484338f541ecb30d80598f8b9d792a6678 | |
parent | 05d26fb765f10e286dd3ce67ef8962f9e3dd1aba (diff) |
Improve exception message when configuration file is not found
Indicate which configuration level caused the exception.
-rw-r--r-- | LibGit2Sharp/Configuration.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LibGit2Sharp/Configuration.cs b/LibGit2Sharp/Configuration.cs index 4ff63071..1730a064 100644 --- a/LibGit2Sharp/Configuration.cs +++ b/LibGit2Sharp/Configuration.cs @@ -265,7 +265,8 @@ namespace LibGit2Sharp if (handle == null && throwIfStoreHasNotBeenFound) { - throw new LibGit2SharpException("No matching configuration file has been found."); + throw new LibGit2SharpException(string.Format("No {0} configuration file has been found.", + Enum.GetName(typeof(ConfigurationLevel), level))); } return handle; |