chkal / mvc-spec-migration-test

0 stars 0 forks source link

Why is ViewEngineException not a RuntimeException? #35

Closed chkal closed 8 years ago

chkal commented 9 years ago

Original issue MVC_SPEC-35 created by keilw:

I noticed in EDR materials. that ViewEngineException inherits from Exception, not RuntimeException. Unless there's a strong reason, e.g. planning IDE support, it seems against common practice by (related) JSRs in the EE space. JAX-RS only seems to have a single exception that derives from IOException (historically a checked exception not runtime exception) otherwise all its exceptions extend RuntimeException. Same with JSF, FacesException is also a runtime exception, so why different here?

chkal commented 9 years ago

Comment by Santiago Pericas-Geertsen:

Mostly because applications don't need to handle these. A ViewEngine is really an extension or SPI. MVC implementations ought to catch and handle these internally.

chkal commented 9 years ago

Comment by keilw:

Some EE JSRs define a distinct "spi" package and sub-packages, not sure, if that might help here, but it would of course clarify the purpose of ViewEngine and related elements.