In the language, any statement that may raise an exception must explicitly state so:
<statement or expression> raises [<Errors>]
Description of potential implementation
Check that said expression or statement indeed does raise a said exception by looking at the signature of said function.
We also may have to look at the signatures of built-in functions, i.e. division can also throw an arithmetic error: ZeroDivisionError.
It would however also need to apply type sensitive flow here, i.e. if we beyond a doubt know that the denominator cannot be 0 we know for sure that this error will not be raised.
Current Issue
148 and to a lesser extent #149
High-level description of the feature
In the language, any statement that may raise an exception must explicitly state so:
<statement or expression> raises [<Errors>]
Description of potential implementation
Check that said expression or statement indeed does raise a said exception by looking at the signature of said function.
We also may have to look at the signatures of built-in functions, i.e. division can also throw an arithmetic error:
ZeroDivisionError
. It would however also need to apply type sensitive flow here, i.e. if we beyond a doubt know that the denominator cannot be 0 we know for sure that this error will not be raised.