Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

KLR should not throw unhandled exception, but a more meaningful message #169

Closed
JaneZhouQ opened this issue May 12, 2014 · 0 comments
Closed
Assignees
Milestone

Comments

@JaneZhouQ
Copy link

When by accident used "K list" vs. "KVM List" after readme for MusicStore. I found this exception.

Expected: a more clear error message that tells me this is a invalid command. or at least give me a much concise version of unhanded Exceptions. 

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.Reflection.TargetInvocat
ionException: Exception has been thrown by the target of an invocation. ---> Sys
tem.IO.FileLoadException: Could not load file or assembly 'list, Culture=neutral
, PublicKeyToken=null' or one of its dependencies. An operation is not legal in
the current state. (Exception from HRESULT: 0x80131509) ---> System.InvalidOpera
tionException: Resolved assembly's simple name should be the same as of the requ
ested assembly.
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyNam
e assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssembl
yLoadContext, AssemblyName assemblyName)
   --- End of inner exception stack trace ---
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String cod
eBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&
stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntro
spection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String code
Base, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& s
tackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntros
pection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName as
semblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMar
k& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIn
trospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName as
semblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMar
k& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean sup
pressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.Framework.Runtime.DefaultHost.GetEntryPoint(String applicationNa
me)
   at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host,
String applicationName, String[] args)
   at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,
 Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec
t[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly ass
embly, String[] args, IServiceProvider serviceProvider)
   at klr.host.Bootstrapper.Main(String[] args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,
 Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec
t[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at klr.hosting.RuntimeBootstrapper.Execute(String[] args)
   at DomainManager.Execute(Int32 argc, Char** argv)
@davidfowl davidfowl added the bug label May 21, 2014
@davidfowl davidfowl added this to the CTP2 milestone May 21, 2014
@davidfowl davidfowl self-assigned this May 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants