Actually I worked it out. The exception was just Visual Studio and turning off that exception let it continue fine.