N
nvyush
Для LS2J можно использовать подобную обработку ошибок:
Visual Basic:
Function SomeFunction(param As String) As String
'запрос к web-сервису
On Error Goto ErrorHandler
On Error 318 Goto Error318
Dim jSession As JavaSession
Dim jClass As JavaClass
Dim jMethod As JavaMethod
Dim jError As JavaError
Dim jErrorStackTrace As String
Set jSession = New JavaSession()
Set jClass = jSession.GetClass("SomePackage/SomeClass")
Set jMethod = jClass.GetMethod("SomeMethod", "(Ljava/lang/String;)Ljava/lang/String;")
SomeFunction = jMethod.Invoke(, param)
Exit Function
Error318:
Set jError = jSession.getLastJavaError()
jErrorStackTrace = jError.StackTrace
Call jSession.ClearJavaError()
ErrorHandler:
msgbox Error + chr$(10) + jErrorStackTrace + chr$(10) + "line: " + cstr(erl)
End Function