1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

Goodbye ABORT. Hello ERROR for all errors.

This commit is contained in:
Bruce Momjian
1998-01-07 21:07:04 +00:00
parent e6c6146eb8
commit 679d39b9c8
99 changed files with 493 additions and 497 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.4 1998/01/05 03:35:52 momjian Exp $
* $Header: /cvsroot/pgsql/src/tutorial/C-code/Attic/beard.c,v 1.5 1998/01/07 21:07:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -34,10 +34,10 @@ beard(Oid picture)
int cc;
if ((pic_fd = lo_open(picture, INV_READ)) == -1)
elog(ABORT, "Cannot access picture large object");
elog(ERROR, "Cannot access picture large object");
if (lo_read(pic_fd, (char *) &ihdr, sizeof(ihdr)) != sizeof(ihdr))
elog(ABORT, "Picture large object corrupted");
elog(ERROR, "Picture large object corrupted");
beardOffset = (ihdr.size / 3) * 2;
@ -45,16 +45,16 @@ beard(Oid picture)
* new large object
*/
if ((beard = lo_creat(INV_MD)) == 0) /* ?? is this right? */
elog(ABORT, "Cannot create new large object");
elog(ERROR, "Cannot create new large object");
if ((beard_fd = lo_open(beard, INV_WRITE)) == -1)
elog(ABORT, "Cannot access beard large object");
elog(ERROR, "Cannot access beard large object");
lo_lseek(pic_fd, beardOffset, SET_CUR);
while ((cc = lo_read(pic_fd, buf, BUFSIZE)) > 0)
{
if (lo_write(beard_fd, buf, cc) != cc)
elog(ABORT, "error while writing large object");
elog(ERROR, "error while writing large object");
}
lo_close(pic_fd);

View File

@ -45,7 +45,7 @@ complex_in(char *str)
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2)
{
elog(ABORT, "complex_in: error in parsing \"%s\"", str);
elog(ERROR, "complex_in: error in parsing \"%s\"", str);
return NULL;
}
result = (Complex *) palloc(sizeof(Complex));