diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-07-27 17:10:07 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-07-27 17:10:07 +0000 |
commit | e8db9b26d03b9e58a30eb26ec2ee21c92293d3a2 (patch) | |
tree | c2adf83074db369ea5211b06e5181ebabf1a61d8 /src/tutorial/complex.c | |
parent | aeea73d4eceb9b33ff16a69c77bd923a0394a6d0 (diff) | |
download | postgresql-e8db9b26d03b9e58a30eb26ec2ee21c92293d3a2.tar.gz postgresql-e8db9b26d03b9e58a30eb26ec2ee21c92293d3a2.zip |
elog mop-up.
Diffstat (limited to 'src/tutorial/complex.c')
-rw-r--r-- | src/tutorial/complex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tutorial/complex.c b/src/tutorial/complex.c index b95baa2be0e..c8d4cbe320f 100644 --- a/src/tutorial/complex.c +++ b/src/tutorial/complex.c @@ -38,10 +38,10 @@ complex_in(char *str) 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; |