def log_user_activity(name, begin_time, end_time, has_error = false)
      return do_nothing_on_null(:log_user_activity) if null?
      @transaction.log_activity(next_user_activity_name,
        begin_time, end_time, name, has_error)
    end
def log_user_activity(name, begin_time, end_time, has_error = false)
      return do_nothing_on_null(:log_user_activity) if null?
      @transaction.log_activity(next_user_activity_name,
        begin_time, end_time, name, has_error)
    end
Logs a user-defined activity, for display in the activity timeline.

 An activity is a block in the activity timeline in the Union Station
 user interace. It has a name, a begin time and an end time.

 Unlike {#log_user_activity_block}, this form does not expect a block.
 However, you are expected to pass timing information.

 @param name The name that should show up in the activity timeline.
   It can be any arbitrary name but may not contain newlines.
 @param [TimePoint or Time] begin_time  The time at which this activity
   begun. See {UnionStationHooks.now} to learn more.
 @param [TimePoint or Time] end_time The time at which this activity
   ended. See {UnionStationHooks.now} to learn more.
 @param [Boolean] has_error Whether an uncaught
   exception occurred during the activity.