Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
cston authored and jaredpar committed May 4, 2017
1 parent cd0e5e8 commit e8f0a19
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/Compilers/Server/VBCSCompiler/VBCSCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,22 @@ public static int Main(string[] args)
var controller = new DesktopBuildServerController(appSettings);
return controller.Run(args);
}
catch (TypeInitializationException ex) when (ex.InnerException is FileNotFoundException)
catch (FileNotFoundException e)
{
// Assume FileNotFoundException was the result of a missing
// compiler assembly. Log the exception and terminate the process.
CompilerServerLogger.LogException(ex, "File not found");
return CommonCompiler.Failed;
// Assume the exception was the result of a missing compiler assembly.
LogException(e);
}
catch (TypeInitializationException e) when (e.InnerException is FileNotFoundException)
{
// Assume the exception was the result of a missing compiler assembly.
LogException((FileNotFoundException)e.InnerException);
}
return CommonCompiler.Failed;
}

private static void LogException(FileNotFoundException e)
{
CompilerServerLogger.LogException(e, "File not found");
}
}
}

0 comments on commit e8f0a19

Please sign in to comment.