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