I'd say compensation, not everything.
Really, marriage (legally speaking only) ought to just be a contract, with terms for violating it dependent on what the people involved in the marriage want. Fortunately, liberal government laws as to divorce allow (somewhat) for a prenup to define such terms, imposing financial penalties for leaving because of tough times, adultery, etc. This is a problem best solved without use of a one size fits all government contract, but a unique marriage contract that people should spend time considering and putting effort into. A church/religion could have a standard contract they use, for example, which would define what they consider to be acceptable, etc.