Error Trap

Add-in Express™ Support Service
That's what is more important than anything else

Error Trap
How to trap ADX errors in VB.NET 
Jack Bretcher




Posts: 189
Joined: 2006-06-30
How do I trap ADX errors in VB.NET, I assume I just need a catch stmt with the appropriate error type....
I found the AddinExpress.MSO.ADXErrorEventArgs class but it is not valid since it does not inherit from system.exception and AddinExpress.MSO.ADXErrorEventArgs.adxerror is not recognized....
Jack
Posted 19 Jul, 2006 11:36:41 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Jack.

You need to use the OnError event handler of the addinmodule. This handler uses the AddinExpress.MSO.ADXErrorEventArgs class.
Posted 19 Jul, 2006 11:42:56 Top
Jack Bretcher




Posts: 189
Joined: 2006-06-30
Sergey,

I added the following to the AddinModule_OnError sub:
WriteLogFile("Error in:" & e.ADXError.Source & ", Target Site: " & e.ADXError.TargetSite.ToString & ", Message: " & e.ADXError.Message)
e.Handled = True

but it still displays the standard ADX error dialog.

The error occurs OutlookItemsEventsClass1.ProcessItemAdd, do I need to trap elsewhere also?


Jack
Posted 19 Jul, 2006 12:29:12 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Jack.

I have just tested the AddinModule_OnError and OutlookItemsEventsClass.ProcessItemAdd event handles and all works fine.
What version of ADX do you use?
Posted 20 Jul, 2006 07:18:16 Top
Jack Bretcher




Posts: 189
Joined: 2006-06-30
AddinExpress.MSO.2005.dll - 2.6.1760.2005
extensibility.dll - 7.0.9466.0
AddinExpress.Install.2005.dll - 2.6.1760.2005
Posted 20 Jul, 2006 07:50:43 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Jack, I can't reproduce the issue. Can I test your project on my PC?
Posted 20 Jul, 2006 15:48:03 Top
Jack Bretcher




Posts: 189
Joined: 2006-06-30
Yes, I just rebuilt it and am testing it. If I get the same behavior I will send it to you, where should I send it?

Jack
Posted 20 Jul, 2006 17:03:28 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Jack, I have just sent you an email.
Posted 20 Jul, 2006 17:12:07 Top