update error_table[] E_STRING symbols

Now the "E_STRING" errsym strings in error_table[], with exception
to the 1st E__BASE entry, all other errsym strings must match the
following regular expression:

	^E_[A-Z][A-Z0-9_]+$

Renamed "E_1OVER0" to "E_DIVBYZERO".
Renamed "E_0OVER0" to "E_ZERODIVZERO".
This commit is contained in:
Landon Curt Noll
2023-09-13 21:38:07 -07:00
parent 3b9393a8ac
commit 5e5656652f
6 changed files with 48 additions and 26 deletions

4
func.c
View File

@@ -3348,7 +3348,7 @@ f_coth(int count, VALUE **vals)
switch (vals[0]->v_type) {
case V_NUM:
if (qiszero(vals[0]->v_num))
return error_value(E_1OVER0);
return error_value(E_DIVBYZERO);
result.v_num = qcoth(vals[0]->v_num, err);
result.v_type = V_NUM;
break;
@@ -3453,7 +3453,7 @@ f_csch(int count, VALUE **vals)
switch (vals[0]->v_type) {
case V_NUM:
if (qiszero(vals[0]->v_num))
return error_value(E_1OVER0);
return error_value(E_DIVBYZERO);
result.v_num = qcsch(vals[0]->v_num, err);
result.v_type = V_NUM;
break;