2016-03-05 language Wrong coding in c++ Use exception instead return booleanSample code as below: try { // Do something here, which may throw exception } catch (MyException& e) { if (e.getError() == MyExceptionA) { // Do another normal operation } } Throw exception in loopReference Newer c Older why use json