Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在VB.NET中捕获JIRA SOAP引发的异常?_Vb.net_Exception_Soap_Jira - Fatal编程技术网

如何在VB.NET中捕获JIRA SOAP引发的异常?

如何在VB.NET中捕获JIRA SOAP引发的异常?,vb.net,exception,soap,jira,Vb.net,Exception,Soap,Jira,我想捕获JIRA的SOAP API中登录函数引发的异常。函数login抛出2个异常。如果用户提供了无效的用户名或密码,则为RemoteAuthenticationException;如果出现阻止操作运行的问题,则为RemoteException 目前,我正在使用此代码捕获异常 Try ... Catch jiraException As Exception MsgBox(jiraException.toString) End Try 我输入了无效的用户名和密码,并打印了异常。它

我想捕获JIRA的SOAP API中登录函数引发的异常。函数login抛出2个异常。如果用户提供了无效的用户名或密码,则为RemoteAuthenticationException;如果出现阻止操作运行的问题,则为RemoteException

目前,我正在使用此代码捕获异常

Try
    ...
Catch jiraException As Exception
    MsgBox(jiraException.toString)
End Try
我输入了无效的用户名和密码,并打印了异常。它是这样说的: System.ServiceMode.FaultException:com.atlassian.jira.rpc.exception.RemoteAuthenticationException:无效的用户名或密码


我想分别捕捉这两个异常。我该怎么做?提前谢谢

您应该能够将它们捕获为com.atlassian.jira.rpc.exception.RemoteAuthenticationException的FaultException和com.atlassian.jira.rpc.exception.RemoteException的FaultException。

您能告诉我这个异常需要哪个dll、引用或类吗?只需通过添加服务引用访问它们的SOAP API即可