[MAGNOLIA-2080] "JCR Queries" should display exception messages instead of blank results, and a row count for valid results Created: 28/Feb/08 Updated: 23/Jan/13 Resolved: 10/Jul/08 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | admininterface |
| Affects Version/s: | 3.5.4 |
| Fix Version/s: | 3.6 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Ryan Gardner | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Description |
|
The exceptions were all being caught and logged in the QueryUtil - and therefore were unavailable for the JCR Utils page to get them to display. I made another "exceptionThrowingQuery" method in the QueryUtil that throws exceptions, and called that method in the JCR Utils method. To avoid duplicate code, the query method now delegates the actual query to the exceptionThrowingQuery method and the traps the exception, logs it, and returns the Collections.EmptyList (identical behavior to what it was before) In addition, the size of the collection returned is now printed when results are returned. This can be helpful for knowing row counts... etc. |
| Comments |
| Comment by Ryan Gardner [ 28/Feb/08 ] |
|
Updated version - this one initially assigns the Collection to Collections.EMPTY_LIST instead of null. |
| Comment by Ryan Gardner [ 28/Feb/08 ] |
|
Ok... this version should be the final one. I noticed that in the past one I wasn't returning out of the method if an exception was caught - this version now does that. |
| Comment by Magnolia International [ 28/Feb/08 ] |
|
thanks for the patch! will review and apply asap |
| Comment by Magnolia International [ 10/Jul/08 ] |
|
path (finally) applied! Thanks |