2011-10-23 17:05:13 +02:00
|
|
|
/* error_util.c - internal error utilities for notmuch.
|
2009-10-21 22:57:02 +02:00
|
|
|
*
|
|
|
|
* Copyright © 2009 Carl Worth
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2016-06-02 18:26:14 +02:00
|
|
|
* along with this program. If not, see https://www.gnu.org/licenses/ .
|
2009-10-21 22:57:02 +02:00
|
|
|
*
|
|
|
|
* Author: Carl Worth <cworth@cworth.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
2011-10-23 17:05:13 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
2009-10-21 22:57:02 +02:00
|
|
|
|
2011-10-23 17:05:13 +02:00
|
|
|
#include "error_util.h"
|
2009-10-21 22:57:02 +02:00
|
|
|
|
2012-09-24 17:21:19 +02:00
|
|
|
void
|
2011-10-23 17:05:13 +02:00
|
|
|
_internal_error (const char *format, ...)
|
|
|
|
{
|
|
|
|
va_list va_args;
|
2009-10-21 22:57:02 +02:00
|
|
|
|
2011-10-23 17:05:13 +02:00
|
|
|
va_start (va_args, format);
|
2009-10-21 22:57:02 +02:00
|
|
|
|
2011-10-23 17:05:13 +02:00
|
|
|
fprintf (stderr, "Internal error: ");
|
|
|
|
vfprintf (stderr, format, va_args);
|
2009-10-22 00:06:52 +02:00
|
|
|
|
2017-08-26 16:41:39 +02:00
|
|
|
va_end (va_args);
|
2011-10-23 17:05:13 +02:00
|
|
|
exit (1);
|
|
|
|
}
|
2010-11-02 06:01:15 +01:00
|
|
|
|