function _addException(exception, segment) {
  if (!this.isActive()) {
    logger.trace('Transaction is not active. Not capturing error: ', exception)
    return
  }

  this._linkExceptionToSegment(exception, segment)
  this.exceptions.push(exception)
}
Associate an exception with the transaction.  When the transaction ends,
the exception will be collected along with the transaction details.

@param {Exception}   exception  The exception object to be collected.
@param {Segment}     segment    The segment to which the exception is linked.