mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-10-25 15:19:23 +00:00
24 lines
651 B
C#
24 lines
651 B
C#
using System;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Spectre.Console.Tests.Data
|
|
{
|
|
public static class TestExceptions
|
|
{
|
|
[SuppressMessage("Usage", "CA1801:Review unused parameters", Justification = "<Pending>")]
|
|
public static bool MethodThatThrows(int? number) => throw new InvalidOperationException("Throwing!");
|
|
|
|
public static void ThrowWithInnerException()
|
|
{
|
|
try
|
|
{
|
|
MethodThatThrows(null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new InvalidOperationException("Something threw!", ex);
|
|
}
|
|
}
|
|
}
|
|
}
|