If an exception is occured during a model saving then the model could be questionable left in an inconsistent state (beforeSave is called, but afterSave is not called)

https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php#L396-L409

See the lines:

https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php#L396-L396
and
https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php#L399-L399


https://github.com/magento/magento2/issues/2632

See also: