input: Write a python function to convert an element to a specific domain, handling different types and potential failures.
  ```python
  assert convert(5, IntegerRing()) == IntegerRing()(5)
  assert convert(3.14, RealField()) == RealField()(3.14)
  assert convert(2+3j, ComplexField()) == ComplexField()(2+3j)
  assert convert(PythonRational(1, 2), RationalField()) == RationalField()(PythonRational(1, 2))
output: def convert(element, domain):
      try:
          return domain()(element)
      except Exception as e:
          return f"Conversion to {domain} failed: {str(e)}"