Exception thrown at build time by an implementation of CompileTimeValidate(object) when an annotation is invalid.
Implements
Namespace: PostSharp.Extensibility
Assembly: PostSharp.dll
Syntax
public class InvalidAnnotationException : Exception, ISerializableRemarks
PostSharp reports the exception as a build error that includes its message, and does not apply the annotation.
Instead of throwing this exception, you can also emit an error with Write(MessageLocation, SeverityType, string, string)
or a MessageSource and return false.
Constructors
| Name | Description |
|---|---|
| InvalidAnnotationException() | Initializes a new instance of the InvalidAnnotationException class with a default message. |
| InvalidAnnotationException(SerializationInfo, StreamingContext) | Deserialization constructor. |
| InvalidAnnotationException(string) | Initializes a new instance of the InvalidAnnotationException class with a specified exception message. |
| InvalidAnnotationException(string, Exception) | Initializes a new instance of the InvalidAnnotationException class with a specified exception message and inner Exception. |