Skip to content

Commit

Permalink
fix: add ProblemInstanceException constructor overloads (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alxandr authored Dec 19, 2024
1 parent 6901a3e commit 95b8a0b
Showing 1 changed file with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,28 @@ public class ProblemInstanceException
/// </summary>
/// <param name="problemInstance">The <see cref="Problem"/>.</param>
public ProblemInstanceException(ProblemInstance problemInstance)
: base(problemInstance.Detail)
: this(null, problemInstance)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ProblemInstanceException"/> class.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="problemInstance">The <see cref="Problem"/>.</param>
public ProblemInstanceException(string? message, ProblemInstance problemInstance)
: this(message, null, problemInstance)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="ProblemInstanceException"/> class.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="innerException">The inner exception.</param>
/// <param name="problemInstance">The <see cref="Problem"/>.</param>
public ProblemInstanceException(string? message, Exception? innerException, ProblemInstance problemInstance)
: base(message ?? problemInstance.Detail, innerException)
{
Problem = problemInstance;
}
Expand Down

0 comments on commit 95b8a0b

Please sign in to comment.