# File lib/god/conditions/process_exits.rb, line 34
      def register
        pid = self.pid

        begin
          EventHandler.register(pid, :proc_exit) do |extra|
            formatted_extra = extra.size > 0 ? " #{extra.inspect}" : ""
            self.info = "process #{pid} exited#{formatted_extra}"
            self.watch.trigger(self)
          end

          msg = "#{self.watch.name} registered 'proc_exit' event for pid #{pid}"
          applog(self.watch, :info, msg)
        rescue StandardError
          raise EventRegistrationFailedError.new
        end
      end