You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: exec.rb
    path of file: ./repos/dd-trace-rb/lib/datadog/profiling/tasks
    
    the code of the file until where you have to start completion: module Datadog
  module Profiling
    module Tasks
      # Wraps command with Datadog profiling
      clas
    
        def exec_with_error_handling(args)
          Kernel.exec(*args)
        rescue Errno::ENOENT => e
          Kernel.warn "ddprofrb exec failed: #{e.class.name} #{e.message} (command was '#{args.join(' ')}')"
          Kernel.exit 127
        rescue Errno::EACCES, Errno::ENOEXEC => e
          Kernel.warn "ddprofrb exec failed: #{e.class.name} #{e.message} (command was '#{args.join(' ')}')"
          Kernel.exit 126
        end