I disagree with your boss. There are proper places for break and continue to be used. In fact the reason that execeptions and exception handling were introduced to modern programming languages is that you can't solve every problem using just structured techniques.
On a side note I don't want to start a religious discussion here but you could restructure your code to be even more readable like this:
while (primary_condition) {
if (loop_count > 1000) || (time_exect > 3600) {
break;
} else if ( ( this->data != "undefined") && ( !this->skip ) ) {
... // where the real work of the loop happens
}
}
while (primary_condition) {
if (loop_count > 1000) || (time_exect > 3600) {
break;
} else if ( ( this->data != "undefined") && ( !this->skip ) ) {
... // where the real work of the loop happens
}
}
On another side note
I personally dislike the use of ( flag == true ) in conditionals because if the variable is a boolean already, then you are introducing an additional comparison that needs to happen when the value of the boolean has the answer you want - unless of course you are certain that your compiler will optimize that extra comparison away.