Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9405


Ignore:
Timestamp:
04/30/13 10:53:12 (12 years ago)
Author:
gkronber
Message:

#1423 added a constructor for OperatorExecutionException with a message parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/OperatorExecutionException.cs

    r9339 r9405  
    2525namespace HeuristicLab.Core {
    2626  public class OperatorExecutionException : Exception {
    27     private IOperator op;
     27    private readonly IOperator op;
    2828    public IOperator Operator {
    2929      get { return op; }
    3030    }
     31
     32    private readonly string message;
    3133    public override string Message {
    3234      get {
     
    3840        }
    3941        if (InnerException == null)
    40           return base.Message + name + ".";
     42          return base.Message + name + message + ".";
    4143        else
    4244          return base.Message + name + ": " + InnerException.Message;
     
    4446    }
    4547
    46     public OperatorExecutionException(IOperator op)
     48    public OperatorExecutionException(IOperator op) : this(op, string.Empty) { }
     49    public OperatorExecutionException(IOperator op, string message)
    4750      : base("An exception was thrown by the operator ") {
    4851      if (op == null) throw new ArgumentNullException();
    4952      this.op = op;
     53      this.message = message;
    5054    }
    5155    public OperatorExecutionException(IOperator op, Exception innerException)
Note: See TracChangeset for help on using the changeset viewer.