Skip to Content
author's profile photo
Former Member

Exception handling in an RFC server

Hi,

I've an RFC server coded in vb.net. Am trying to capture the exceptions raised by the server in an ABAP program. But it is giving a short dump. Can any one tell me the reason for this?

Regards,

Aravinda Sarma M.

The following is the code:

Try

SqlHeaderConnection.Open()

rsHeaderData = sqlCommand.ExecuteReader()

Catch ex As RfcAbapException

'excpError = New RfcAbapException("NOCONN", "Error in Query")

Throw ex

Finally

rsHeaderData.Close()

SqlHeaderConnection.Close()

End Try

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 30, 2005 at 08:02 AM

    Neither SqlHeaderConnection.Open nor sqlCommand.ExecuteReader will throw RfcAbapExceptions, but some other .NET exceptions that cannot be understood by APAP. So you need to convert the .NET-exception to an ABAP-Exception:

    Try

    SqlHeaderConnection.Open()

    rsHeaderData = sqlCommand.ExecuteReader()

    Catch ex As Exception

    Throw New RfcAbapException("NOCONN", "Error in Query")

    Finally

    rsHeaderData.Close()

    SqlHeaderConnection.Close()

    End Try

    Add comment
    10|10000 characters needed characters exceeded