如何在VB.NET中捕获JIRA SOAP引发的异常?
我想捕获JIRA的SOAP API中登录函数引发的异常。函数login抛出2个异常。如果用户提供了无效的用户名或密码,则为RemoteAuthenticationException;如果出现阻止操作运行的问题,则为RemoteException 目前,我正在使用此代码捕获异常如何在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 我输入了无效的用户名和密码,并打印了异常。它
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即可