blob: dd7183362448435288e30d8aa62d06f346e6f9f7 [file] [log] [blame]
henrike@webrtc.orgf7795df2014-05-13 18:00:26 +00001/*
2 * Copyright 2006 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include <stdio.h>
12#include <stdlib.h>
13#include <stdarg.h>
14
15#include "webrtc/base/checks.h"
16#include "webrtc/base/logging.h"
17
18void Fatal(const char* file, int line, const char* format, ...) {
19 char msg[256];
20
21 va_list arguments;
22 va_start(arguments, format);
23 vsnprintf(msg, sizeof(msg), format, arguments);
24 va_end(arguments);
25
26 LOG(LS_ERROR) << "\n\n#\n# Fatal error in " << file
27 << ", line " << line << "\n#" << msg
28 << "\n#\n";
29 abort();
30}