YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

How to handle errors in SDK API's when used in .NET Options · View
rtom
#1 Posted : Friday, April 22, 2011 3:40:45 AM
Rank: Newbie
Groups: Member

Joined: 4/21/2011
Posts: 2
The samples in the SDK and documentation are mostly in VB.
I am using the .NET (C#) classes.

The documentation refers to error codes such as pseSERVERIDMISMATCH that can be generated during call to Open.

How does one catch/manage/use these codes in c#.

Is the error caught through a try/catch exception handling?
Or is it generated though the server.MessageLogs?

It seems like it should be

if !server.Open.(connectionString))
{
err - server.GetLastErrorMessage();
}

I don't see anything that resemblies this.

I did see a property server.MessageLogs.List(.....)

But its hard to identify which of the messages in the queu belong to this request.

Any comments on how to manage error conditions would be grealy appreciated.

Rick
Sponsor  
 

OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System.
We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ  or contact OSIsoft vCampus for more details.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.