diff options
author | Manuel Klimek <klimek@google.com> | 2013-09-05 08:31:48 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2013-09-05 08:31:48 +0000 |
commit | 22d58ddc9e3cb01ef2d736a27759cda39a336b95 (patch) | |
tree | 4361b2bc90dbdce6c95dd9a4fcc038a792c65361 /tools/clang-format-vs | |
parent | efb288c3c1e67cb94410fd43aa0352922bcb5d52 (diff) |
Make error text if clang-format is not on the system PATH more helpful,
as this is going to be a common mistake (installing LLVM defaults to not putting
the tools onto the PATH).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-format-vs')
-rw-r--r-- | tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs b/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs index 61cc6447c0..c216030b9d 100644 --- a/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs +++ b/tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs @@ -148,7 +148,16 @@ namespace LLVM.ClangFormat // Thus, we:
// 1. Start the process - clang-format.exe will start to read the input from the
// standard input.
- process.Start();
+ try
+ {
+ process.Start();
+ }
+ catch (Exception e)
+ {
+ throw new Exception(
+ "Cannot execute " + process.StartInfo.FileName + ".\n\"" +
+ e.Message + "\".\nPlease make sure it is on the PATH.");
+ }
// 2. We write everything to the standard output - this cannot block, as clang-format
// reads the full standard input before analyzing it without writing anything to the
// standard output.
|