.

ConfigLoadPropertyStatusEventArgs.InnerException

Gets the internal exception that caused the error. If the error was not caused by an exception, then the InternalException will be null.

Version History

Introduced in MPX 2.0.

Type

Mpx.Exception (read only)

Visual Basic

Syntax

ReadOnly Property InnerException() As Mpx.Exception

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 mpxExc As Mpx.Exception = e.InnerException

   If Not (mpxExc Is Nothing) Then

      ' Print the error information from the underlying

      ' exception that caused the error.

      msg = mpxExc.Error

      msg += ": "

      msg += mpxExc.Message

      System.Console.WriteLine(msg)

   End If

End Sub

 


Sample Application

 

C#

Syntax

 

Sample Code

 

public void OnLoadPropertyError(Mpx.ConfigLoader saver,
     Mpx.ConfigLoadPropertyErrorEventArgs e)
{
     Mpx.Exception mpxExc = e.InternalException;
     if (mpxExc != null)
     {
         // Print the error information from the underlying
         // exception that caused the error.

         msg = mpxExc.Error
               + ": "
               + mpxExc.Message
               + "\n";
         System.Console.Write(msg);
     }
}

See Also

 

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