0 Replies Latest reply on Oct 28, 2007 5:21 AM by Terry

    Catching Runtime Exceptions

    Terry Apprentice

      Runtime exceptions are caught in pages.xml file. Is it possible to append own message specified in pages.xml to the exception message?

      Say for exception thrown:

      org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): au.edu.tisc.entity.ApplicationMessage

      pages.xml
      ...
      <exception class="javax.persistence.PersistenceException">
       <end-conversation/>
       <redirect view-id="/error.xhtml">
       <message>Database operation failed, please retry...</message>
       </redirect>
      </exception>
      ...