A Genetic Programming Framework for .NET

CompilationException Constructor (String, CompilerErrorCollection)

Initializes a new instance of the CompilationException class with a specified error message and a reference to the compilation errors that are the cause of this exception.

public CompilationException(
   string message,
   CompilerErrorCollection compilationErrors
);

Parameters

message
A message that describes the error.
compilationErrors
A collection containing the CompilerErrors that are the cause of the current exception.

Remarks

The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

An exception that is thrown as a direct result of an ICodeCompiler compilation error should include a reference to the collection of those CompilerErrors in the CompilationErrors property. The CompilationErrors property returns the same value that is passed into the constructor.

The following table shows the initial property values for an instance of CompilationException.

Property Value
CompilationErrors The specified collection reference.
InnerException A null reference.
Message The specified message string.

See Also

CompilationException Class | GeneticProgrammingEngine.Internal Namespace | CompilationException Constructor Overload List