jessevdk / cldoc

clang based documentation generator for C and C++
GNU General Public License v2.0
552 stars 58 forks source link

Asynchronous data loading fails silently on network error #108

Open cbiffle opened 9 years ago

cbiffle commented 9 years ago

In the generated HTML webapp, network errors are not handled in any user-visible fashion.

Found in b3fc442786b219746cf6487fc606ef1a77e94a90

Steps to reproduce

Here's a local example that simulates a flaky internet connection / server.

  1. Generate docs.
  2. Run cldoc serve. It pops up yet another browser tab, but that's something for another issue report. :-)
  3. Kill cldoc serve (e.g. ^C).
  4. Click on a link in the browser tab.

    Expected results

A browser "network problem" page. This is the right approach because, in modern browsers, it will kick off network connection status monitoring and may automatically retry the GET when the connection comes back, sometimes before the user notices.

Barring that, a custom dialog explaining that something has gone wrong.

Actual results

Nothing. You can click the link all you want.

If you happen to browse with your JavaScript Console open you might see something like the following:

Failed to load resource: net::ERR_CONNECTION_REFUSED