fixes QubesOS/qubes-issues#2074
From now on there are different exceptions which can be raise on different occasions. fixes QubesOS/qubes-issues#1279