From fec6c18702d4a8d6dd0a5ae943f52fb61be25edc Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Mon, 26 Jun 2017 21:05:58 +0200 Subject: [PATCH] Added some early argument verification. --- src/Generator.Rewrite/Program.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Generator.Rewrite/Program.cs b/src/Generator.Rewrite/Program.cs index 02c44cb1..e866b00f 100644 --- a/src/Generator.Rewrite/Program.cs +++ b/src/Generator.Rewrite/Program.cs @@ -38,6 +38,19 @@ namespace OpenTK.Rewrite return; } + // Argument error checking + if (!File.Exists(Options.TargetAssembly)) + { + Console.Error.WriteLine($"Target assembly not found. \n" + + $"Please check the given path ({Options.TargetAssembly})."); + } + + if (!File.Exists(Path.ChangeExtension(Options.TargetAssembly, "pdb"))) + { + Console.Error.WriteLine("Debugging symbols for target assembly not found. \n" + + "Please make sure that debugging symbols are being generated."); + } + var program = new Program(); var file = args[0]; var key = args[1];