Menu

#26 Switch to using unchecked exceptions throughout the API

3.0
open
nobody
0.5 (8)
5
2013-01-20
2006-12-14
Anonymous
No

Nearly all HAPI exceptions are checked. Because HAPI is a message processing toolkit, most exceptional conditions are unrecoverable, as in not recoverable without system administrator or user interaction. That situation typically calls for RuntimeException derivates instead of Exception derivates, and would remove a lot of boilerplate when using the API.

Existing code impact would be minimal.

Discussion

  • Christian Ohr

    Christian Ohr - 2012-09-20

    I would support this - checked exceptions are used way to often in HAPI (e.g. HL7Exception).
    However, changing it to extend from RuntimeException would elliminate the throws clauses and therefore breaks backwards-compatibility.

     
  • Jens Villadsen

    Jens Villadsen - 2012-09-20

    However, is this backward compatibilty really needed?

     
  • Christian Ohr

    Christian Ohr - 2013-01-20
    • milestone: --> 3.0
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.