Throw an exception if one of the entities are broken

Adding functionality for throwing an exception if any of the posts are
broken. The script fill display all validation errors in the console to
be easier for maintenance