It's an abstract class, which I'm not familiar with. A code sample on how to use it would be most welcome.
It's an abstract class, which I'm not familiar with. A code sample on how to use it would be most welcome.
RA reports most failures by throwing an instance of LaserficheRepositoryException. LaserficheErrorObject is used to indicate errors in a few particular cases where either 1) RA wants to tell you about multiple problems with your fields or 2) a long-running (i.e. asynchronous) operation failed. In either case you can access the members that are defined in the LaserficheErrorObject base class (if that's what you mean by "getting to that object itself"). That the class is abstract just means that you will be dealing with a subclass of one of the types Ed lists.
Its okay that its abstract, you shouldn't need to create it, RA will create two versions of it. LongOperationError and BadFieldValue.
The main place I've ever used it is the BadFieldValue case. You can call 'GetBadFieldValues' on your EntryInfo if saving fields fails and figure out which fields failed to update and why.
EntryInfo entry = ...; // Set Some Fields wrong // save foreach(BadFieldValue value in entry.GetBadFieldValues()) { // Process the error string field = value.ObjectName; string error = value.Message; int errorCode = value.ErrorCode; }
Thanks. Can you confirm I can't get to that object itself? I was wanting to use the ErrorCode property. I had assumed this object was created each time there was an Lf error, but maybe not.
RA reports most failures by throwing an instance of LaserficheRepositoryException. LaserficheErrorObject is used to indicate errors in a few particular cases where either 1) RA wants to tell you about multiple problems with your fields or 2) a long-running (i.e. asynchronous) operation failed. In either case you can access the members that are defined in the LaserficheErrorObject base class (if that's what you mean by "getting to that object itself"). That the class is abstract just means that you will be dealing with a subclass of one of the types Ed lists.