def exec_hook(event_name, *args, &block)
      @hooks[event_name.to_s].map do |hook_name, callable|
        begin
          callable.call(*args, &block)
        rescue PuppetDebugger::Exception::Error, ::RuntimeError => e
          errors << e
          e
        end
      end.last
    end
def exec_hook(event_name, *args, &block)
      @hooks[event_name.to_s].map do |hook_name, callable|
        begin
          callable.call(*args, &block)
        rescue PuppetDebugger::Exception::Error, ::RuntimeError => e
          errors << e
          e
        end
      end.last
    end
Execute the list of hooks for the `event_name` event.
 @param [Symbol] event_name The name of the event.
 @param [Array] args The arguments to pass to each hook function.
 @return [Object] The return value of the last executed hook.