At the end of running a build, exit with the thread error code, if one occurred