Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 35d2e52

Browse files
committed
Change throw/catch to conditional. fixes #456
1 parent c1ca061 commit 35d2e52

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/absil/ilread.fs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3971,19 +3971,15 @@ let ClosePdbReader pdb =
39713971
#endif
39723972

39733973
let OpenILModuleReader infile opts =
3974-
3975-
#if FX_NO_NATIVE_MEMORY_MAPPED_FILES
3976-
#else
3977-
try
3974+
if not IL.runningOnMono then
39783975
let mmap = MemoryMappedFile.Create infile
39793976
let modul,ilAssemblyRefs,pdb = genOpenBinaryReader infile mmap opts
39803977
{ modul = modul;
39813978
ilAssemblyRefs=ilAssemblyRefs;
39823979
dispose = (fun () ->
39833980
mmap.Close();
39843981
ClosePdbReader pdb) }
3985-
with _ ->
3986-
#endif
3982+
else
39873983
let mc = ByteFile.OpenIn infile
39883984
let modul,ilAssemblyRefs,pdb = genOpenBinaryReader infile mc opts
39893985
{ modul = modul;

0 commit comments

Comments
 (0)