From e8db9b26d03b9e58a30eb26ec2ee21c92293d3a2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 27 Jul 2003 17:10:07 +0000 Subject: elog mop-up. --- doc/src/sgml/xtypes.sgml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/xtypes.sgml b/doc/src/sgml/xtypes.sgml index 97688d92621..35112c1c5e2 100644 --- a/doc/src/sgml/xtypes.sgml +++ b/doc/src/sgml/xtypes.sgml @@ -1,5 +1,5 @@ @@ -70,14 +70,15 @@ typedef struct Complex { Complex * complex_in(char *str) { - double x, y; - Complex *result; + double x, + y; + Complex *result; if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2) - { - elog(ERROR, "complex_in: error in parsing %s", str); - return NULL; - } + ereport(ERROR, + (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), + errmsg("invalid input syntax for complex: \"%s\"", str))); + result = (Complex *) palloc(sizeof(Complex)); result->x = x; result->y = y; -- cgit v1.2.3