Added assertion error throw