Fixed deprecated raise style
Changed call to raise to work in the same way as the deprecated raise style