]> andersk Git - moira.git/blame - backup/dumprest.pc
Bomb out with an error message if something goes wrong. Duh!
[moira.git] / backup / dumprest.pc
CommitLineData
d77bf7b9 1/*
2 * $Source$
3 * $Author$
4 * $Header$
5 *
6 * (c) Copyright 1988 by the Massachusetts Institute of Technology.
7 * For copying and distribution information, please see the file
8 * <mit-copyright.h>.
9 *
10 */
11
12#ifndef lint
13static char *rcsid_dumprest_qc = "$Header$";
14#endif lint
15
16#include <stdio.h>
d77bf7b9 17#include <mit-copyright.h>
18
19punt(msg)
20 char *msg;
21{
22 perror(msg);
d77bf7b9 23 exit(1);
24}
b4188632 25
26dbmserr(void)
27{
28 EXEC SQL BEGIN DECLARE SECTION;
29 char err_msg[256];
30 EXEC SQL END DECLARE SECTION;
31 int bufsize=256, msglength=0;
32
33 sqlglm(err_msg, &bufsize, &msglength);
34 err_msg[msglength]=0;
35 fprintf(stderr, "Fatal SQL error:\n%s", err_msg);
36 exit(1);
37}
This page took 1.168483 seconds and 5 git commands to generate.