Skip to content

Commit

Permalink
Rename _node to Node in ParseException
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamboree committed Feb 4, 2024
1 parent fd90cbc commit 76a809d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/DarkConfig/Exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ namespace DarkConfig {
/// numbers in the config files are much more prominent.
public class ParseException : Exception {
public ParseException(DocNode exceptionNode, string message, Exception inner = null) : base((inner != null ? inner.Message + "\n" : "") + message) {
_node = exceptionNode;
Node = exceptionNode;
_wrappedException = inner;
}

public override string StackTrace => _wrappedException == null ? base.StackTrace : _wrappedException.StackTrace + "\n-----\n" + base.StackTrace;
public override string Message => base.Message + (HasNode ? $" from {_node.SourceInformation}" : "");
public override string Message => base.Message + (HasNode ? $" from {Node.SourceInformation}" : "");
public bool HasNode {
get { return _node != null; }
get { return Node != null; }
}

readonly DocNode _node;
public readonly DocNode Node;
readonly Exception _wrappedException;
}

Expand Down

0 comments on commit 76a809d

Please sign in to comment.