Edit

Share via


IDesignerSerializationManager.ReportError(Object) Method

Definition

Reports an error in serialization.

public:
 void ReportError(System::Object ^ errorInformation);
public void ReportError (object errorInformation);
abstract member ReportError : obj -> unit
Public Sub ReportError (errorInformation As Object)

Parameters

errorInformation
Object

The error to report. This information object can be of any object type. If it is an exception, the message of the exception is extracted and reported to the user. If it is any other type, ToString() is called to display the information to the user.

Remarks

If the serialization manager supports logging multiple errors in its implementation of ReportError, it can store the error information object for a future report where all the errors encountered can be displayed at once. If this method stores multiple errors, serialization can continue after a call to this method. If this method does not support logging multiple errors, this method should throw an exception, which aborts serialization.

Note

The serialization manager should never throw an exception for errors encountered during serialization. It should only throw an exception during deserialization. Otherwise, users become confused because saving the document should never fail.

Applies to