예제 #1
0
 /// <inheritdoc />
 protected MSBuildException(SerializationInfo serializationInfo, StreamingContext streamingContext)
     : base(serializationInfo, streamingContext)
 {
     MSBuildMessage = new MSBuildMessage(DefaultMessage);
 }
예제 #2
0
 /// <summary>
 /// 用一个 MSBuild 控制台消息创建一个包含内部异常的编译错误。
 /// </summary>
 /// <param name="message">MSBuild 控制台消息。</param>
 /// <param name="innerException">内部异常。</param>
 internal MSBuildException(MSBuildMessage message, Exception innerException)
     : base(message?.ToString(MessageLevel.Error) ?? throw new ArgumentNullException(nameof(message)), innerException)
 {
     MSBuildMessage = message;
 }
예제 #3
0
 /// <inheritdoc />
 public MSBuildException(string message) : base(message)
 {
     MSBuildMessage = new MSBuildMessage(message);
 }
예제 #4
0
 /// <inheritdoc />
 public MSBuildException(string message, Exception innerException) : base(message, innerException)
 {
     MSBuildMessage = new MSBuildMessage(message);
 }
예제 #5
0
 /// <summary>
 /// 尽量不要使用此构造函数来创建,因为这样会缺少有效的信息用于修复编译错误。
 /// </summary>
 public MSBuildException() : base(DefaultMessage)
 {
     MSBuildMessage = new MSBuildMessage(DefaultMessage);
 }