Skip to content

Commit 5acee0d

Browse files
committed
make error message for font.align clearer
1 parent be49061 commit 5acee0d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src_c/font.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,14 +484,17 @@ font_setter_align(PyObject *self, PyObject *value, void *closure)
484484

485485
long val = PyLong_AsLong(value);
486486
if (val == -1 && PyErr_Occurred()) {
487-
PyErr_SetString(PyExc_TypeError, "font.align should be an integer");
487+
PyErr_SetString(
488+
PyExc_TypeError,
489+
"font.align should be an integer."
490+
"Must correspond with FONT_LEFT, FONT_CENTER, or FONT_RIGHT");
488491
return -1;
489492
}
490493

491494
if (val < 0 || val > 2) {
492495
PyErr_SetString(
493496
pgExc_SDLError,
494-
"font.align should be FONT_LEFT, FONT_CENTER, or FONT_RIGHT");
497+
"font.align should be FONT_LEFT, FONT_CENTER, or FONT_RIGHT, (0, 1 or 2)");
495498
return -1;
496499
}
497500

0 commit comments

Comments
 (0)