In any case where the court has power to make an occupation order or non-molestation order, the court may accept an undertaking from any party to the proceedings.
No power of arrest may be attached to any undertaking given under subsection (1).
The court shall not accept an undertaking under subsection (1) instead of making an occupation order in any case where apart from this section a power of arrest would be attached to the order.
The court shall not accept an undertaking under subsection (1) instead of making a non-molestation order in any case where it appears to the court that—
An undertaking given to a court under subsection (1) is enforceable as if the court had made an occupation order or a non-molestation order in terms corresponding to those of the undertaking.
This section has effect without prejudice to the powers of the High Court and the family court apart from this section.