Coexistence of ferromagnetism and superconductivity in ErRh4B4 and HoMo6S8: Exchange or electromagnetic mechanism?