SEI
GitHub
CERT Secure Coding
  • Home
  • SEI CERT Oracle Coding Standard for Java
    • Front Matter
    • Rules
    • Recommendations
      • Characters and Strings (STR)
      • Concurrency (CON)
      • Declarations and Initialization (DCL)
      • Exceptional Behavior (ERR)
        • ERR50-J. Use exceptions only for exceptional conditions
        • ERR51-J. Prefer user-defined exceptions over more general exception types
        • ERR52-J. Avoid in-band error indicators
        • ERR53-J. Try to gracefully recover from system errors
        • ERR54-J. Use a try-with-resources statement to safely handle closeable resources
      • Expressions (EXP)
      • Input Output (FIO)
      • Input Validation and Data Sanitization (IDS)
      • Methods (MET)
      • Miscellaneous (MSC)
      • Numeric Types and Operations (NUM)
      • Object Orientation (OBJ)
      • Platform Security (SEC)
    • Back Matter
    • Admin

Exceptional Behavior (ERR)

  • ERR50-J. Use exceptions only for exceptional conditions
  • ERR51-J. Prefer user-defined exceptions over more general exception types
  • ERR52-J. Avoid in-band error indicators
  • ERR53-J. Try to gracefully recover from system errors
  • ERR54-J. Use a try-with-resources statement to safely handle closeable resources

DCL61-J. Do not use raw typesERR50-J. Use exceptions only for exceptional conditions
SEI
  • www.cmu.edu

© 2026 Carnegie Mellon University

  • Legal
  • Privacy Policy