Lines Matching defs:error
709 /* Implementation of the "backslashreplace" error handler for 8-bit encodings:
776 /* Implementation of the "xmlcharrefreplace" error handler for 8-bit encodings:
851 #error "LONG_BIT is smaller than 32"
1738 Return 0 on success, or -1 on error. */
2529 on error. */
2601 character. Return NULL on error. */
3497 also convert to lowercase. Return 1 on success, or 0 on error (encoding is
3765 PyErr_SetString(PyExc_ValueError, "unsupported error handler");
3892 int error;
3895 error = PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
3899 if (error) {
3986 PyErr_SetString(PyExc_ValueError, "unsupported error handler");
4382 /* error handling callback helper:
4386 return 0 on success, -1 on error
4397 static const char *argparse = "Un;decoding error handler must return (str, int) tuple";
4447 PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", newpos);
4510 static const char *argparse = "Un;decoding error handler must return (str, int) tuple";
4562 PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", newpos);
4848 /* if we're in an inconsistent state, that's an error */
5037 # error C 'size_t' size should be either 4 or 8!
5251 /* UTF-8 decoder: use surrogateescape error handler if 'surrogateescape' is
5252 non-zero, use strict error handler otherwise.
5260 On decoding error (if surrogateescape is zero), return -2. If wlen is
5262 is not NULL, write the decoding error message into *reason. */
5392 /* UTF-8 encoder using the surrogateescape error handler .
5399 error message into *reason (if reason is set).
5468 /* surrogateescape error handler */
5474 *reason = "encoding error";
5880 goto error;
5888 goto error;
5895 goto error;
5901 goto error;
5913 goto error;
5916 goto error;
5942 error:
6219 goto error;
6227 goto error;
6234 goto error;
6240 goto error;
6252 goto error;
6255 goto error;
6281 error:
6325 (but if the error callback returns a long replacement string
6444 goto error;
6451 goto error;
6500 goto error;
6517 error:;
6731 length after conversion to the true value. (But decoding error
6806 goto error;
6811 goto error;
6821 error:;
6985 /* error handling callback helper:
6997 static const char *argparse = "On;encoding error handler must return (str/bytes, int) tuple";
7038 PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", *newpos);
7104 /* cache callback name lookup (if not done yet, i.e. it's the first error) */
7303 /* byte outsize range 0x00..0x7f: call the error handler */
7312 /* Fast-path: the error handler only writes one character,
7428 * Returns consumed size if succeed, returns -2 on decode error, or raise an
7429 * OSError and returns -1 on other error.
7448 goto error;
7464 goto error;
7467 error:
7475 * Decode a byte string from a code page into unicode object with an error
7479 * UnicodeDecodeError exception and returns -1 on error.
7514 /* The last error was ERROR_NO_UNICODE_TRANSLATION, then we raise a
7521 goto error;
7528 goto error;
7531 goto error;
7557 goto error;
7580 goto error;
7597 error:
7721 * Returns consumed characters if succeed, returns -2 on encode error, or raise
7722 * an OSError and returns -1 on other error.
7775 goto error;
7809 goto error;
7824 error:
7835 * error handler.
7838 * -1 on other error.
7871 /* The last error was ERROR_NO_UNICODE_TRANSLATION,
7889 goto error;
7897 goto error;
7905 goto error;
7908 goto error;
7943 goto error;
7951 goto error;
7962 goto error;
7976 goto error;
7986 goto error;
7998 "unable to encode error handler result to ASCII");
8000 goto error;
8014 goto error;
8017 error:
8547 error occurred). */
8610 reallocation error occurred. The caller must decref the result */
8667 /* handle an error in PyUnicode_EncodeCharmap
8668 Return 0 on success, -1 on error */
8719 * (if not done yet, i.e. it's the first error) */
8855 if (x==enc_EXCEPTION) /* error */
8921 /* error handling callback helper:
8933 static const char *argparse = "Un;translating error handler must return (str, int) tuple";
8968 PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", *newpos);
8979 Return 0 on success, -1 on error */
9030 was undefined, raise an exception return -1 on error. */
9138 translated into writer, raise an exception and return -1 on error. */
9201 /* error handler */
9493 * Return value: -1 on error, number of characters otherwise.
10660 goto error;
10673 if (!buf1) goto error;
10682 if (!buf2) goto error;
10695 if (!sbuf) goto error;
10698 if (!buf1) goto error;
10703 goto error;
10736 if (!buf1) goto error;
10745 if (!buf2) goto error;
10752 if (!sbuf) goto error;
10761 if (!buf1) goto error;
10769 goto error;
10779 goto error;
10783 goto error;
10841 goto error;
10870 error:
11261 /* Memory error or bad data */
11286 /* memory error or bad data */
11296 /* memory error or bad data */
11492 goto error;
11496 goto error;
11498 goto error;
11517 goto error;
11532 goto error;
11545 goto error;
11554 error:
11661 The error handling scheme to use for encoding errors.
14366 Return 0 on success, raise an exception and return -1 on error. */
14407 * Return value: a new PyUnicodeObject*, or NULL if error.
14553 * -1 and raise an exception on error */
14690 Raise an exception and return -1 on error. */
14877 -1 on error. */
15139 Return 0 on success, raise an exception and return -1 on error. */
15407 that will be decoded using the given encoding and error handler.\n\
15513 goto error;
15516 goto error;
15519 goto error;
15523 error:
15908 goto error;
15913 goto error;
15919 goto error;
15926 goto error;
15935 error:
15963 PyErr_SetString(PyExc_RuntimeError, "unknown filesystem error handler");