zoukankan      html  css  js  c++  java
  • **********method.Invoke Exception has been thrown by the target

    You may receive this exception when you use the Invoke() method (of a form perhaps). The cause of this exception is another exception which occured inside the
    from:
    http://www.geekpedia.com/KB70_Exception-has-been-thrown-by-the-target-of-an-invocation.html

    method being invoked.
    Since you don't know what actually went wrong inside the method that was being invoked, we will need to get the inner exception of the method.
    Suppose we have the following line which invokes a method:

    MyForm.Invoke(MyForm.MyDelegate, new Object[] { someParameter });

    To catch the exception, enclose the line within a try/catch block and get the InnerException:

    try
    {
       MyForm.Invoke(MyForm.MyDelegate, new Object[] { someParameter });
    }
    catch (Exception ex)
    {
       MessageBox.Show(ex.InnerException.Message);
    }

    This should show you the actual exception message inside a message box.
  • 相关阅读:
    性能测试分类
    monkey命令选项参考
    Hibernate三种状态
    Hibernate 的延迟加载
    JAVA2的三个版本
    缓存
    队列、生产消费模型.html
    socketserver剖析.html
    socketserver 之 recv(1024) 问题!
    粘包问题
  • 原文地址:https://www.cnblogs.com/luoyaoquan/p/2293301.html
Copyright © 2011-2022 走看看