Skip to content

Commit 75392d3

Browse files
committed
Fixed binary reader error message
1 parent 695069d commit 75392d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/fsharp/CompileOps.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,8 +2565,8 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
25652565
clrRoot, (int v1, sprintf "v%d.%d" v1 v2), (v1=5us && v2=0us && v3=5us) // SL5 mscorlib is 5.0.5.0
25662566
| _ ->
25672567
failwith (FSComp.SR.buildCouldNotReadVersionInfoFromMscorlib())
2568-
with _ ->
2569-
error(Error(FSComp.SR.buildCannotReadAssembly(filename),rangeStartup))
2568+
with e ->
2569+
error(Error(FSComp.SR.buildErrorOpeningBinaryFile(filename, e.Message), rangeStartup))
25702570
| _ ->
25712571
#if !ENABLE_MONO_SUPPORT
25722572
// TODO: we have to get msbuild out of this
@@ -2626,8 +2626,8 @@ type TcConfig private (data : TcConfigBuilder,validate:bool) =
26262626
checkFSharpBinaryCompatWithMscorlib filename ilReader.ILAssemblyRefs ilReader.ILModuleDef.ManifestOfAssembly.Version rangeStartup;
26272627
let fslibRoot = Path.GetDirectoryName(FileSystem.GetFullPathShim(filename))
26282628
fslibRoot (* , sprintf "v%d.%d" v1 v2 *)
2629-
with _ ->
2630-
error(Error(FSComp.SR.buildCannotReadAssembly(filename),rangeStartup))
2629+
with e ->
2630+
error(Error(FSComp.SR.buildErrorOpeningBinaryFile(filename, e.Message), rangeStartup))
26312631
| _ ->
26322632
data.defaultFSharpBinariesDir
26332633

0 commit comments

Comments
 (0)