using new exceptions from sqlalchemy