Added some early argument verification.

This commit is contained in:
Jarl Gullberg 2017-06-26 21:05:58 +02:00
parent 20399f2da7
commit fec6c18702
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23

View file

@ -38,6 +38,19 @@ namespace OpenTK.Rewrite
return; 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 program = new Program();
var file = args[0]; var file = args[0];
var key = args[1]; var key = args[1];