/// <summary> /// Initializes a new instance of the <see cref="Trace"/> class. /// </summary> /// <param name="frames">The frames.</param> /// <param name="exception">The exception.</param> public Trace(Frame[] frames, RollbarExceptionDto exception) { Assumption.AssertNotNull(frames, nameof(frames)); Assumption.AssertNotNull(exception, nameof(exception)); Frames = frames; Exception = exception; }
/// <summary> /// Initializes a new instance of the <see cref="Trace"/> class. /// </summary> /// <param name="exception">The exception.</param> public Trace(System.Exception exception) { Assumption.AssertNotNull(exception, nameof(exception)); var frames = new StackTrace(exception, true).GetFrames() ?? new StackFrame[0]; Frames = frames.Select(frame => new Frame(frame)).ToArray(); Exception = new RollbarExceptionDto(exception); }