[Tutor] Why subclassing exceptions?

Prasad, Ramit ramit.prasad at jpmorgan.com
Wed Sep 28 16:15:07 CEST 2011

>If you are using asserts for data validation, then your code is broken. 
>The caller can disable every single assert, and hence remove your data 
>validation, by simply passing a command line switch when calling your 

To be fair, there are plenty of situations where someone has enough control of their execution environment to prevent that from happening. I agree on principle and for readability/maintainability; if I saw that I would be highly confused as to why asserts were everywhere.


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 21h6 - 5423

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

More information about the Tutor mailing list