Moved error handling setup out of construct_loop.
Moved error handling setup out of construct_loop.

teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor,teoliphant/numpy-refactor