G
Guest
Hi,
I have an app that is crashing due to a System.ArgumentException. At this
point it's just a simple app to test some basic object values. The main app
is a Windows App that looks like this.
Public Class DesTestForm
Private Sub DesTestForm_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim x As DFTypeTests = New DFTypeTests()
x.DFTypesTestSetup()
Try
x.Test001DFTypesListRead()
Catch ex As Exception
Dim i As Integer = 5
End Try
End Sub
End Class
This "form" is the startup form. So the OnLoad code runs when I start
debugging. I've single stepped through the code called by
x.DFTypesTestSetup() and it's OK. The exception occurs when
x.Test001DFTypesListRead() is run. Using "Step Into" on that line
immediately takes me to the Catch block.
ex.Message is {"Value does not fall within the expected range."}
ex.Data.Item is " In order to evaluate an indexed property, the property
must be qualified and the arguments must be explicitly supplied by the user."
ex.StackTrace correctly shows Test001DFTypesListRead() as the last call.
The code being called is in a separate Class Library project in the same
Solution...
Public Class DFTypeTests
Dim a As Boolean
Dim types As DFTypesList
Dim t As DFType
Public Sub DFTypesTestSetup()
ScenarioManager.SetScenario(3)
BPPrincipal.Logout()
a = BPPrincipal.Login("MTwain", "pw")
End Sub
Public Sub Test001DFTypesListRead()
' Read the Scenario 3 DFTypesList
' Test the contents of the first and last object in the list
' Get the DFTypesList
<Do some tests>...
End Sub
Nothing in Test001DFTypesListRead() ever runs. The exception occurs
immediately on the call to Test001DFTypesListRead() from the Form.Load
handler.
Apparently, the compiler is interpreting the call as an attempt to read an
indexed property and crashes because there's no argument?
However, the TargetSite MemberType property of the exception correctly
identifies the TargetSite as a "Method{8}"
I don't think I have any code access problems because the call to
DFTypesTestSetup() works.
Any suggestions are appreciated.
Thanks.
BBM
I have an app that is crashing due to a System.ArgumentException. At this
point it's just a simple app to test some basic object values. The main app
is a Windows App that looks like this.
Public Class DesTestForm
Private Sub DesTestForm_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim x As DFTypeTests = New DFTypeTests()
x.DFTypesTestSetup()
Try
x.Test001DFTypesListRead()
Catch ex As Exception
Dim i As Integer = 5
End Try
End Sub
End Class
This "form" is the startup form. So the OnLoad code runs when I start
debugging. I've single stepped through the code called by
x.DFTypesTestSetup() and it's OK. The exception occurs when
x.Test001DFTypesListRead() is run. Using "Step Into" on that line
immediately takes me to the Catch block.
ex.Message is {"Value does not fall within the expected range."}
ex.Data.Item is " In order to evaluate an indexed property, the property
must be qualified and the arguments must be explicitly supplied by the user."
ex.StackTrace correctly shows Test001DFTypesListRead() as the last call.
The code being called is in a separate Class Library project in the same
Solution...
Public Class DFTypeTests
Dim a As Boolean
Dim types As DFTypesList
Dim t As DFType
Public Sub DFTypesTestSetup()
ScenarioManager.SetScenario(3)
BPPrincipal.Logout()
a = BPPrincipal.Login("MTwain", "pw")
End Sub
Public Sub Test001DFTypesListRead()
' Read the Scenario 3 DFTypesList
' Test the contents of the first and last object in the list
' Get the DFTypesList
<Do some tests>...
End Sub
Nothing in Test001DFTypesListRead() ever runs. The exception occurs
immediately on the call to Test001DFTypesListRead() from the Form.Load
handler.
Apparently, the compiler is interpreting the call as an attempt to read an
indexed property and crashes because there's no argument?
However, the TargetSite MemberType property of the exception correctly
identifies the TargetSite as a "Method{8}"
I don't think I have any code access problems because the call to
DFTypesTestSetup() works.
Any suggestions are appreciated.
Thanks.
BBM