Sync db.exception from Oslo

Change-Id: I7ff5e8920a84b1c3cc59278fb6e21b6bf2913733
Closes-Bug: #1273301
Merge "Sync db.exception from Oslo"