]> andersk Git - moira.git/blob - backup/dumprest.pc
Bomb out with an error message if something goes wrong. Duh!
[moira.git] / backup / dumprest.pc
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
13 static char *rcsid_dumprest_qc = "$Header$";
14 #endif lint
15
16 #include <stdio.h>
17 #include <mit-copyright.h>
18
19 punt(msg)
20         char *msg;
21 {
22         perror(msg);
23         exit(1);
24 }
25
26 dbmserr(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 0.042933 seconds and 5 git commands to generate.