IV2010 and VB.NET - Exceptions thrown by Inventor

IV2010 and VB.NET - Exceptions thrown by Inventor

Anonymous
Not applicable
316 Views
2 Replies
Message 1 of 3

IV2010 and VB.NET - Exceptions thrown by Inventor

Anonymous
Not applicable
IV2010 and VB.NET 2008

Is there a list of Exceptions that may be thrown by Inventor? Does Inventor define any custom Exceptions or only use the default Exceptions defined by VB.NET? I searched the Inventor API for "Exception" and also looked in the Inventor namespace for any Exception objects, but could not find any. TIA
0 Likes
317 Views
2 Replies
Replies (2)
Message 2 of 3

jeff.pek
Community Manager
Community Manager
Hi Josh -

I don't think there is such a list, but the answer should be pretty simple: very few.

Most of the time, since you always are using COM to talk to the Inventor API, you would see a COMException. This has the HRESULT of the underlying COM call as one of its fields, but generally, this is just "E_FAIL".

Certain specific COM errors, such as E_NOTIMPL ("not implemented"), or E_INVALIDARG ("invalid argument"), get translated into the corresponding .NET exceptions, e.g., System.NotImplementedException or System.ArgumentException.

Jeff
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks for the info!
0 Likes