ConfigSavePropertyErrorEventArgs Class |
||
|
Provides data for the ConfigSaver.PropertyErrorEventHandler delegate. A ConfigSavePropertyError event is raised when an error occurs while saving object configuration. The ConfigSavePropertyErrorEventArgs class provides information such as the error type and the string representation of the property that generated the error.
|
ConfigSavePropertyErrorEventArgs ErrorCode Message PropertyPath InnerException |
Visual Basic
Syntax
Class ConfigSavePropertyErrorEventArgs
Sample Code
' This method handles PropertyError events that occur while ' saving the configuration of an object. Public Sub OnSavePropertyError(ByVal saver As Mpx.ConfigSaver, ByVal e As Mpx.ConfigSavePropertyErrorEventArgs) ' Example output: ' Error: Controller.Axis[2]: Axis is not enabled Dim msg As String = "Error: " msg += e.PropertyPath msg += ": " msg += e.Message System.Console.WriteLine(msg) If e.ErrorCode = Mpx.ConfigSaveErrorCode.Internal Then ' Cancel the save operation saver.Cancel() System.Console.WriteLine("Canceled!") End If End Sub |
Sample Application
C#
Syntax
class ConfigSavePropertyErrorEventArgs
Sample Code
// This method handles PropertyError events that occur while saving if (e.ErrorCode == Mpx.ConfigSaveErrorCode.Internal) |
See Also
ConfigSaver
ConfigSaveErrorCode