Magnetic and structural properties of the ternary hydride phases of ErFe2