private static string lvPathFinder(CliOptions options) { if (options.lvExe != null) { if (!File.Exists(options.lvExe)) { throw new FileNotFoundException("specified executable not found", options.lvExe); } return(options.lvExe); } if (options.lvVer != null) { try { return(LvVersions.ResolveVersionString(options.lvVer, options.x64).ExePath); } catch (KeyNotFoundException ex) { throw; // So the exception makes it to the handler above. } } if (LvVersions.CurrentVersion != null) { return(LvVersions.CurrentVersion.ExePath); } else { throw new FileNotFoundException("No LabVIEW.exe found...", "LabVIEW.exe"); } }
private static lvVersion lvPathFinder(CliOptions options) { if (options.lvVer != null) { try { return(LvVersions.ResolveVersionString(options.lvVer, options.x64)); } catch (KeyNotFoundException ex) { throw; // So the exception makes it to the handler above. } } if (LvVersions.CurrentVersion != null) { return(LvVersions.CurrentVersion); } else { return(new lvVersion()); } }