I'm observing some strange behavior when using the F# interactive interpreter.
Running the following code:
let getType1 = Type.GetType("namespace.does.not.exist, doesntexistlib, Version=188.8.131.52, Culture=neutral, PublicKeyToken=null",false);; let getType2 = Type.GetType("namespace.does.not.exist, doesntexistlib, Version=184.108.40.206, Culture=neutral, PublicKeyToken=null",false);;
results in fsi catching a FileLoadException even though the throwOnError parameter is set to false. The first time it returns a null second time the exception occurs.
Running the same code in a regular program (not interactively) results in expected behavior where getType = null.
Does FSI.exe stop on all exceptions? Is it possible to set FSI to ignore these exceptions?
Facebook - change background image of facebook app
Implementation of Review method in Facebook Application
What information about the Facebook user does the Facebook API allow you? [closed]
Unfortunately FSI is throwing the exception itself when it can't resolve the assembly - this isn't being generated by framework code, and that's why your
throwOnErrorparameter isn't being respected - FSI's exception is just propagating upwards and then being caught at the top level.
Pushing facebook status updates to application server?
To me, this looks like a bug in FSI, but it may be that the available hooks in the AppDomain's assembly resolution process don't provide FSI with enough information to determine when it's okay to throw..
facebook feed template: right alignment for text
EDIT - If you look into the source file fsi.fs (included in the F# distribution in the source/fsharp/Fsi directory), you can see where this handler is hooked up (it's in the frighteningly named
Photos in the Facebook album not showing
It appears that FSI needs to hook into the resolution process so that assemblies registered via the
#rdirective can be found, but I can't tell at a glance where things are going wrong, or why no exception is thrown all the way to the top level the first time you try to resolve an invalid assembly..
referencing my facebook application with a querystring
Facebook API: How do I get the 'Allow Access?' page to display?