func Integer.Add(x) { throw @NegativesNotAllowed(x) when x < 0 this + x } try { 12.Add(-5) } catch { @NegativesNotAllowed(x) => print("Negative number: \(x)") }