CompilerErrorException

The CompilerErrorException class defines the exception that is thrown when an application manifest compiler encounters an error.

The CompilerErrorException class is derived from the System.ApplicationException class.

Public Constructors

The CompilerErrorException class has the following public constructor.

Constructor

Description

CompilerErrorException.CompilerErrorException (ArrayList)

Initializes a new object of the CompilerErrorException class, with the error messages specified as an ordered ArrayList.

Public Methods

The CompilerErrorException class has the following public methods.

Method

Description

EqualString

Inherited from System.Object. Determines whether the specified System.Object is equal to the current System.Object.

GetBaseException()

Inherited from System.ApplicationException. When overridden in a derived class, returns the System.Exception that is the root cause of one or more subsequent exceptions.

GetHashCode()

Inherited from System.Object. Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

GetObjectData(SerializationInfo, StreamingContext)

Inherited from System.ApplicationException. When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception.

GetType()

Inherited from System.Object. Gets the System.Type of the current instance.

ToString()

Inherited from System.Object. Creates and returns a string representation of the current exception.

Public Properties

The CompilerErrorException class has the following public properties.

Property

Description

CompilerErrorException.ErrorMessages

Data type: ArrayListAccess type: Read-only

Contains the errors encountered during compilation of the application manifest.

HelpLink

Data type: StringAccess type: Read/write

Inherited from System.ApplicationException. Gets or sets a link to the help file associated with this exception.

InnerException

Data type: ExceptionAccess type: Read-only

Inherited from System.ApplicationException. Gets the System.Exception instance that caused the current exception.

Message

Data type: StringAccess type: Read-only

Inherited from System.ApplicationException. Gets a message that describes the current exception.

Source

Data type: StringAccess type: Read/write

Inherited from System.ApplicationException. Gets or sets the name of the application or the object that causes the error.

StackTrace

Data type: StringAccess type: Read-only

Inherited from System.ApplicationException. Gets a string representation of the frames on the call stack at the time the current exception was thrown.

TargetSite

Data type: MethodBaseAccess type: Read-only

Inherited from System.ApplicationException. Gets the method that throws the current exception.

Example Code

The following code sample demonstrates how to catch and handle a CompilerErrorException.

  Copy imageCopy Code
ApplicationManifest myAppManifest = ApplicationManifest.CreateFromFile("C:\\xmldocs\\my_app_manifest_xml_file.xml");

try {

myAppManifest.Compile();

}
catch (CompilerErrorException compilerErrorException) {

Console.WriteLine("The following MSPL compiler errors occurred:");
foreach (object errMsg in compilerErrorException.ErrorMessages)
{
   Console.Write("\t{0}", errMsg.ToString());
}
Console.WriteLine();

}

Requirements

Redistributable: Requires Microsoft Lync Server 2010

Namespace:Microsoft.Rtc.Sip

Assembly: ServerAgent (in ServerAgent.dll)