.

ConfigLoadPropertyErrorEventArgs.Message

The Message property describes the nature of the error in a human-readable fashion.

Version History

Introduced in MPX 2.0.

Type

String (read only)

Visual Basic

Syntax

ReadOnly Property Message() As String

Sample Code

 

' This method handles PropertyError events that occur while

' loading the configuration of an object.

Public Sub OnLoadPropertyError(ByVal loader As Mpx.ConfigLoader,

ByVal e As Mpx.ConfigLoadPropertyErrorEventArgs)

   Dim msg As String = "Warning: "

 

   Select Case e.ErrorCode

      Case Mpx.ConfigLoadErrorCode.Missing

      Case Else

         Dim msg As String = "Warning: "

            msg += e.PropertyPath

            msg += ": "

            msg += e.Message

         System.Console.WriteLine(msg)

   End Select

 

End Sub


Sample Application

 

C#

Syntax

string Message { get; }

Sample Code

 

// This method handles PropertyError events that occur while loading
// configuration to an object.

public void OnLoadPropertyError(Mpx.ConfigLoader loader,
   Mpx.ConfigLoadPropertyErrorEventArgs e)
{

   if (e.ErrorCode != Mpx.ConfigLoadErrorCode.Missing)
   {
      // Print an error message
      string msg = "Error: ";
      msg += e.PropertyPath
         + ": "
         + e.Message
         + "\n";
      System.Console.Write(msg);
   }
}

See Also

ConfigLoadPropertyErrorEventArgs

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering