Open
Description
I've been playing around with the events system a bit more recently and found that the combination of the documentation being a little light and the UnitOfWork silently failing makes for some fairly challenging debug sessions.
I'd like to propose that the UnitOfWork throws exceptions when disallowed operations take place. For example, you cannot persist a new document during a postUpdate as it will be simply lost - so rather than just losing it, it would be nice to get an exception telling the developer what they are doing wrong.