Quantcast
Channel: Best practice for using assert? - Stack Overflow
Viewing all articles
Browse latest Browse all 17

Answer by outis for Best practice for using assert?

$
0
0

In addition to the other answers, asserts themselves throw exceptions, but only AssertionErrors. From a utilitarian standpoint, assertions aren't suitable for when you need fine grain control over which exceptions you catch.


Viewing all articles
Browse latest Browse all 17

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>