An exception would also be an acceptable approach, as long as it contains the info needed for fixing the problem.

Maybe you should open a separate PR, since this one contains some weird merges.