3 ms·
You can raise the error as soon as the match operator is executed. Even if match has a valid match with the expression, if all the branches aren't evaluated the
by crimsonalucard 8y ago
You can raise the error as soon as the match operator is executed. Even if match has a valid match with the expression, if all the branches aren't evaluated the function can still raise an error.
This allows for early catching of logic errors during unit testing and negates the need for additional tests.