def raise_error(*args)
      if args.first.kind_of?(Exception)
        exception_type = args.shift
        error_message = args.shift || 'Unknown error'
      else
        raise ArgumentError unless args.first.is_a?(String)
        exception_type = RuntimeError
        error_message = args.shift || 'Unknown error'
      end

      logger.error error_message
      raise  exception_type, error_message
    end
def raise_error(*args)
      if args.first.kind_of?(Exception)
        exception_type = args.shift
        error_message = args.shift || 'Unknown error'
      else
        raise ArgumentError unless args.first.is_a?(String)
        exception_type = RuntimeError
        error_message = args.shift || 'Unknown error'
      end

      logger.error error_message
      raise  exception_type, error_message
    end
@overload raise_error(exception, message)
   raise and log specific exception with message
   @param [Exception] to raise
   @param [String] message error message to raise

 @overload raise_error(message)
   raise and log generic exception with message
   @param [String] message error message to raise