Opened 19 years ago
Closed 19 years ago
#101 closed defect (fixed)
Add try / catch around all Query.iterate methods in list pages
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | critical | Milestone: | BASE 2.0 RC2 |
Component: | web | Version: | |
Keywords: | Cc: |
Description
If there is an error in the query the page will only display a stack trace. If the error is due to a bug in the property filters generated by the rest of the page, it will be hard to fix it since the exception doesn't go away until Tomcat is restarted. In the worst case the current context for the item listed has to be deleted from the database.
This fix has been done for Annotation types list page which can be used as a template. Note that the iterator is null for the rest of page, so check for null must always be made before the iterator is used. Ie. annotationTypes == null ? 0 : annotationType.getTotalCount()