docs: function(opts = {}) {
    if (opts.handleUncaughtExceptions == null) {
      opts.handleUncaughtExceptions = true;
    }
    if (opts.structuredStackTrace == null) {
      opts.structuredStackTrace = false;
    }
    if (opts.handleUncaughtExceptions) {
      process.on('uncaughtException', function(err) {
        prettyPrint(err, {
          colorize: process.stdout.isTTY
        });
        return process.exit(1);
      });
    }
    return Error.prepareStackTrace = function(err, stack) {
      var _stack, frame;
      _stack = (function() {
        var i, len, results;
        results = [];
        for (i = 0, len = stack.length; i < len; i++) {
          frame = stack[i];
          results.push(wrap(err, frame));
        }
        return results;
      })();
      if (opts.structuredStackTrace) {
        err.structuredStackTrace = structured(err, stack);
      }
      return err + ((function() {
        var i, len, results;
        results = [];
        for (i = 0, len = _stack.length; i < len; i++) {
          frame = _stack[i];
          results.push('\n    at ' + frame);
        }
        return results;
      })()).join('');
    };
  }