Should the maintenance template be used when the database API raises an exception?
This looks to be the case of where the documentation is out-of-date. That comment has been around verbatim since D7. D8 doesn't produce a themed maintenance page like D7.

When looking at _drupal_log_error(), you can see that unless Drupal is going through the install process, a fatal error will output a bare error message with a 500 status then exit:

if ($fatal) {
  // We fallback to a maintenance page at this point, because the page generation
  // itself can generate errors.
  // Should not translate the string to avoid errors producing more errors.
  $message = 'The website encountered an unexpected error. Please try again later.' . '&lt;br /&gt;' . $message;

  if ($is_installer) {
    // install_display_output() prints the output and ends script execution.
    $output = array(
      '#title' =&gt; 'Error',
      '#markup' =&gt; $message,
    );
    install_display_output($output, $GLOBALS['install_state'], $response-&gt;headers-&gt;all());
    exit;
  }

  $response-&gt;setContent($message);
  $response-&gt;setStatusCode(500, '500 Service unavailable (with message)');

  $response-&gt;send();
  // An exception must halt script execution.
  exit;
}


Whereas in D7, _drupal_log_error() passes through a themed maintenance page:

if ($fatal) {
  drupal_set_title(t('Error'));
  // We fallback to a maintenance page at this point, because the page generation
  // itself can generate errors.
  print theme('maintenance_page', array('content' =&gt; t('The website encountered an unexpected error. Please try again later.')));
  exit;
}