G
Guest
When trying to throw a custom exception from a COM+ component to a client
using an interface as suggested by microsoft i am getting an "Object
reference not set to an instance of an object."
However when executing the code outside of COM+ the application behaves
correctly.
Public Interface IExceptionGenerator
Sub GenerateException(ByVal Ex As Exception, ByVal SourceAssembly As
String, _
ByVal SourceModule As String, ByVal
SourceProcedure As String)
End Interface
<ClassInterface(ClassInterfaceType.AutoDual), _
Transaction(TransactionOption.Supported), _
Serializable()> _
Public Class ExceptionGenerator
Inherits ServicedComponent
Implements IExceptionGenerator
Public Sub New()
MyBase.new()
End Sub
Public Sub GenerateException(ByVal Ex As System.Exception, ByVal
SourceAssembly As String, ByVal SourceModule As String, ByVal SourceProcedure
As String) Implements IExceptionGenerator.GenerateException
Dim CustEx As New CustomException(Ex, SourceAssembly, SourceModule,
SourceProcedure)
Throw (CustEx)
End Sub
End Class
using an interface as suggested by microsoft i am getting an "Object
reference not set to an instance of an object."
However when executing the code outside of COM+ the application behaves
correctly.
Public Interface IExceptionGenerator
Sub GenerateException(ByVal Ex As Exception, ByVal SourceAssembly As
String, _
ByVal SourceModule As String, ByVal
SourceProcedure As String)
End Interface
<ClassInterface(ClassInterfaceType.AutoDual), _
Transaction(TransactionOption.Supported), _
Serializable()> _
Public Class ExceptionGenerator
Inherits ServicedComponent
Implements IExceptionGenerator
Public Sub New()
MyBase.new()
End Sub
Public Sub GenerateException(ByVal Ex As System.Exception, ByVal
SourceAssembly As String, ByVal SourceModule As String, ByVal SourceProcedure
As String) Implements IExceptionGenerator.GenerateException
Dim CustEx As New CustomException(Ex, SourceAssembly, SourceModule,
SourceProcedure)
Throw (CustEx)
End Sub
End Class