Add custom exception for xdb.