Skip to content

Commit 4dd4e1e

Browse files
authored
Merge pull request #1468 from ncave/patch
Fixed binary reader error message
2 parents 062d672 + d1f6fb6 commit 4dd4e1e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Multitargeting #NoMono #NETFX40Only
22
// Regression test for FSHARP1.0:6026
33
// Just a dummy file...
4-
//<Expects status="error" id="FS0218">Unable to read assembly '.+I_DO_NOT_EXIST\\FSharp\.Core\.dll'$</Expects>
4+
//<Expects status="error" id="FS0229">Error opening binary file '.+I_DO_NOT_EXIST\\FSharp\.Core\.dll'</Expects>
55

66
exit 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #Regression #Multitargeting #NoMono #NETFX40Only
22
// Regression test for FSHARP1.0:6026
33
// Just a dummy file...
4-
//<Expects status="error" id="FS0218">Unable to read assembly '.+I_DO_NOT_EXIST\\FSharp\.Core\.dll'$</Expects>
4+
//<Expects status="error" id="FS0229">Error opening binary file '.+I_DO_NOT_EXIST\\FSharp\.Core\.dll'</Expects>
55

66
exit 0

0 commit comments

Comments
 (0)