Menu

#78 Refining exception policy ?

v3.0
closed
None
5
2008-02-25
2007-07-17
No

Currently the XavaException is not a RuntimeException, and MapFacade (and others) throws RemoteException when a non-application exception is produced.

We can refine this in order to:
- Convert XavaException in a RuntimeException
- Remove RemoteException as "System exception" and use any RuntimeException for this purporse.

The use of RemoteException as system exception is a inheritage of EJB 1.0, the very first version of OpenXava was based in EJB 1.0. Runtime exception is better for "system exception", because a system exception is some unexpected, the programmer does not need to catch, and generally he does not know what to do.

The same for XavaException. In fact, moderns APIs and frameworks does not use checked exception for unexpected problems.

Discussion

  • Javier Paniza

    Javier Paniza - 2007-07-17
    • milestone: --> v3.0
    • assigned_to: nobody --> javierpaniza
     
  • Javier Paniza

    Javier Paniza - 2008-02-25
    • status: open --> closed
     

Log in to post a comment.