Added breaks to switch statement

This commit is contained in:
BLM 2015-07-14 15:20:50 -05:00
parent 2c8dd38166
commit 790a1cb56a
1 changed files with 3 additions and 1 deletions

View File

@ -68,14 +68,15 @@ extern "C" {
break; break;
case PNU::NOT_A_NUMBER: case PNU::NOT_A_NUMBER:
reportParsingError(str, "String does not appear to contain a phone number."); reportParsingError(str, "String does not appear to contain a phone number.");
break;
case PNU::INVALID_COUNTRY_CODE_ERROR: case PNU::INVALID_COUNTRY_CODE_ERROR:
reportParsingError(str, "Invalid country code"); reportParsingError(str, "Invalid country code");
break;
//TODO: handle more error cases specifically. //TODO: handle more error cases specifically.
default: default:
//We have some generic parsing error. //We have some generic parsing error.
reportParsingError(str); reportParsingError(str);
} }
//TODO: handle errors.
//TODO: check number validity. //TODO: check number validity.
} catch(std::bad_alloc& e) { } catch(std::bad_alloc& e) {
reportOutOfMemory(); reportOutOfMemory();
@ -83,6 +84,7 @@ extern "C" {
reportGenericError(e); reportGenericError(e);
} }
//If we get here, we couldn't return a valid number.
PG_RETURN_NULL(); PG_RETURN_NULL();
} }