Change error code for PhoneNumberTooLongException

This commit is contained in:
Ben Merritt 2019-08-06 23:10:32 -07:00
parent 2e1dfefaed
commit 5a4a37ce9a
No known key found for this signature in database
GPG Key ID: F8AD20ED4E6239B7
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ void reportException(const std::exception& exception) {
std::string phone_number = too_long->number_string(); std::string phone_number = too_long->number_string();
phone_number += '\0'; phone_number += '\0';
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("phone number '%s' is too long", phone_number.data()), errmsg("phone number '%s' is too long", phone_number.data()),
errdetail("%s", exception.what()))); errdetail("%s", exception.what())));
return; return;