Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1056)

Side by Side Diff: src/base/logging.cc

Issue 1748183002: Make RUNTIME_ASSERT have more useful output in debug mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Format and improve another error message Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/base/logging.h ('k') | src/messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/base/logging.h" 5 #include "src/base/logging.h"
6 6
7 #if V8_LIBC_GLIBC || V8_OS_BSD 7 #if V8_LIBC_GLIBC || V8_OS_BSD
8 #include <cxxabi.h> 8 #include <cxxabi.h>
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <execinfo.h> 10 #include <execinfo.h>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 line); 108 line);
109 va_list arguments; 109 va_list arguments;
110 va_start(arguments, format); 110 va_start(arguments, format);
111 v8::base::OS::VPrintError(format, arguments); 111 v8::base::OS::VPrintError(format, arguments);
112 va_end(arguments); 112 va_end(arguments);
113 v8::base::OS::PrintError("\n#\n"); 113 v8::base::OS::PrintError("\n#\n");
114 v8::base::DumpBacktrace(); 114 v8::base::DumpBacktrace();
115 fflush(stderr); 115 fflush(stderr);
116 v8::base::OS::Abort(); 116 v8::base::OS::Abort();
117 } 117 }
118
119 extern "C" void V8_RuntimeError(const char* file, int line,
120 const char* message) {
121 fflush(stdout);
122 fflush(stderr);
123 v8::base::OS::PrintError("\n\n#\n# Runtime error in %s, line %d\n# ", file,
124 line);
125 v8::base::OS::PrintError("\n# %s\n", message);
126 v8::base::DumpBacktrace();
127 fflush(stderr);
128 }
OLDNEW
« no previous file with comments | « src/base/logging.h ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698