@@ -1798,13 +1798,30 @@ ERROR(isa_pattern_value,sema_tcp,none,
1798
1798
1799
1799
ERROR(try_unhandled,sema,none,
1800
1800
" errors thrown from here are not handled" , ())
1801
+ ERROR(throwing_call_unhandled,sema,none,
1802
+ " call can throw, but the error is not handled" , ())
1801
1803
ERROR(tryless_throwing_call_unhandled,sema,none,
1802
1804
" call can throw, but it is not marked with 'try' and "
1803
1805
" the error is not handled" , ())
1804
1806
ERROR(throw_in_nonthrowing_function,sema,none,
1805
1807
" error is not handled because the enclosing function "
1806
1808
" is not declared 'throws'" , ())
1807
1809
1810
+ ERROR(throwing_call_in_rethrows_function,sema,none,
1811
+ " throwing call in 'rethrows' function is not to a parameter "
1812
+ " function" , ())
1813
+ ERROR(tryless_throwing_call_in_rethrows_function,sema,none,
1814
+ " throwing call in 'rethrows' function is not to a parameter "
1815
+ " function and is not marked with 'try'" , ())
1816
+ ERROR(throw_in_rethrows_function,sema,none,
1817
+ " 'rethrows' function may only throw by calling a parameter "
1818
+ " function" , ())
1819
+ NOTE(because_rethrows_argument_throws,sema,none,
1820
+ " call is to 'rethrows' function, but argument function can throw" , ())
1821
+ NOTE(because_rethrows_default_argument_throws,sema,none,
1822
+ " call is to 'rethrows' function, but a defaulted argument function"
1823
+ " can throw" , ())
1824
+
1808
1825
ERROR(throwing_call_in_nonthrowing_autoclosure,sema,none,
1809
1826
" call can throw, but it is executed in a non-throwing "
1810
1827
" autoclosure" ,())
@@ -1818,11 +1835,11 @@ ERROR(throw_in_nonthrowing_autoclosure,sema,none,
1818
1835
ERROR(try_unhandled_in_nonexhaustive_catch,sema,none,
1819
1836
" errors thrown from here are not handled because the "
1820
1837
" enclosing catch is not exhaustive" , ())
1838
+ ERROR(throwing_call_in_nonexhaustive_catch,sema,none,
1839
+ " call can throw, but the enclosing catch is not exhaustive" , ())
1821
1840
ERROR(tryless_throwing_call_in_nonexhaustive_catch,sema,none,
1822
1841
" call can throw, but it is not marked with 'try' and "
1823
1842
" the enclosing catch is not exhaustive" , ())
1824
- ERROR(throwing_call_in_nonexhaustive_catch,sema,none,
1825
- " call can throw, but the enclosing catch is not exhaustive" , ())
1826
1843
ERROR(throw_in_nonexhaustive_catch,sema,none,
1827
1844
" error is not handled because the enclosing catch is not exhaustive" , ())
1828
1845
0 commit comments