quince-science / QuinCe

QuinCe is an online tool for processing and quality control of data from scientific instruments, with a primary focus on oceanic data.
https://quince.science
GNU General Public License v3.0
7 stars 8 forks source link

Handling exceptions in beans #480

Open squaregoldfish opened 7 years ago

squaregoldfish commented 7 years ago

Most bean methods simply throw their exceptions. These are either completely unhandled, or will fail silently because the ajax doesn't handle error conditions.

squaregoldfish commented 7 years ago

See also #123

squaregoldfish commented 7 years ago

Use the internalError method for main actions. Work out what to do with ajax calls.

squaregoldfish commented 6 years ago

There is a global exception handler in JSF, and apparently OmniFaces has a good exception handler for AJAX calls, so it's likely that PrimeFaces does too. (See page 224 of the Mastering JSF book)

squaregoldfish commented 6 years ago

882/#883 has added a global exception handler that simply dumps all exceptions to the console. It's a start but we need something more sophisticated and that actually tells the user what's happening.

squaregoldfish commented 6 years ago

screen shot 2018-06-22 at 12 54 47 Another hint for handling ajax calls - registered error listener

squaregoldfish commented 4 years ago

An example is being made in the new QC/Plot pages. Perhaps it should be extended to all beans that do ajaxy things...