LoggerException Class

Definition

Exception that should be thrown by a logger when it cannot continue. Allows a logger to force the build to stop in an explicit way, when, for example, it receives invalid parameters, or cannot write to disk.

public ref class LoggerException : Exception
public ref class LoggerException : Microsoft::Build::Framework::BuildException::BuildExceptionBase
[System.Serializable]
public class LoggerException : Exception
[System.Serializable]
public class LoggerException : Microsoft.Build.Framework.BuildException.BuildExceptionBase
[<System.Serializable>]
type LoggerException = class
    inherit Exception
[<System.Serializable>]
type LoggerException = class
    inherit BuildExceptionBase
Public Class LoggerException
Inherits Exception
Public Class LoggerException
Inherits BuildExceptionBase
Inheritance
LoggerException
Inheritance
LoggerException
Attributes

Remarks

WARNING: marking a type [Serializable] without implementing ISerializable imposes a serialization contract -- it is a promise to never change the type's fields i.e. the type is immutable; adding new fields in the next version of the type without following certain special FX guidelines, can break both forward and backward compatibility

Constructors

LoggerException()

Default constructor.

LoggerException(SerializationInfo, StreamingContext)
Obsolete.

Protected constructor used for (de)serialization. If we ever add new members to this class, we'll need to update this.

LoggerException(String)

Creates an instance of this exception using the specified error message.

LoggerException(String, Exception)

Creates an instance of this exception using the specified error message and inner exception.

LoggerException(String, Exception, String, String)

Creates an instance of this exception using rich error information.

Properties

ErrorCode

Gets the error code associated with this exception's message (not the inner exception).

HelpKeyword

Gets the F1-help keyword associated with this error, for the host IDE.

StackTrace (Inherited from BuildExceptionBase)

Methods

FlushCustomState()
GetObjectData(SerializationInfo, StreamingContext)
Obsolete.

ISerializable method which we must override since Exception implements this interface If we ever add new members to this class, we'll need to update this.

InitializeCustomState(IDictionary<String,String>)
ToString() (Inherited from BuildExceptionBase)

Applies to