Example #1
0
 /// <summary>
 /// Initializes a new instance of an exception without an error message
 /// </summary>
 /// <param name="error">The error code.</param>
 /// <param name="ctx">A context object that describes what was being done when the exception occured.</param>
 public SwiffotronException(SwiffotronError error, SwiffotronContext ctx)
     : base(error.ToString() + "; " + ctx.ToString())
 {
     this.Error    = error;
     this.Sentinel = ctx.SentinelString;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of an exception with an error message
 /// </summary>
 /// <param name="error">The error code.</param>
 /// <param name="ctx">A context object that describes what was being done when the exception occured.</param>
 /// <param name="msg">The error message</param>
 /// <param name="inner">The inner exception</param>
 public SwiffotronException(SwiffotronError error, SwiffotronContext ctx, string msg, Exception inner)
     : base(error.ToString() + "; " + msg + "; " + ctx.ToString(), inner)
 {
     this.Error    = error;
     this.Sentinel = ctx.SentinelString;
 }