Modify the given code to add an exception handler.
Input: def divide(x, y):
  return x / y
def divide(x, y):
  try:
    return x / y
  except ZeroDivisionError:
    return 0
def divide(x, y):
  try:
    return x / y
  except ZeroDivisionError as e:
    print(e)