public static void Main()
throw MakeMyException("oh no");
} catch (MyException ex) {
Console.WriteLine($"I caught MyException: {ex}");
Console.WriteLine("I shouldn't have caught this");
public static Exception MakeMyException(string message) {
return new MyException("oh no");
public class MyException: Exception {
public MyException(string message): base(message) {