Add code to raise errors