docs: function handleError(err) {
  
    // Print error message.
    console.log(chalk.red(err.message));
  
    // Print stack trace.
    console.log(chalk.red(kbox.getStackTrace(err)));
  
    // Log error to local log.
    return kbox.core.log.error(err)
    // Report error to stats server.
    .then(function() {
      return kbox.metrics.reportError(err);
    })
    // Exit the process with a failure.
    .finally(function() {
      process.exit(1);
    });
  
  }