cancel
Showing results for 
Search instead for 
Did you mean: 

Handling a System.InvalidCastException

Former Member
0 Kudos

Hi All,

Trying to call a webservice function but keep getting an application terminated error.

"Error: Exception thrown has not been handled. : System.InvalidCastException"

What is the best way to capture and handle this error without the application stopping? Tried to create a custom object of Error, Exception, RunTimeError and Throwable but have gotten no where.

Using PB 12.5.2 with a build of 5883.

Thanks,

Stuart

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Stuart;

  Can you tell us ...

1) PB.Net or PB Classic

2) MS-Windows version

3) 32 or 64 bit O/S

4) How are you calling the WS?

Regards ... Chris

Former Member
0 Kudos

1 - Classic

2 - Windows 7 Professional

3 - 64 bit O/S

4 - I have created a proxy, instantiated as an object and am using the function as defined. In this case it a SalesForce WSDL and I am using the upsert function. It is defined as upsert(string externalfieldid, sobject sobject[]). It wants a concrete entity type for the SObject[] so in this case I am using Contract. When I call the function, it passes back the error.

Stuart