diff options
| author | Apollon Oikonomopoulos <apoikos@debian.org> | 2016-01-14 00:10:06 +0200 |
|---|---|---|
| committer | Apollon Oikonomopoulos <apollon@skroutz.gr> | 2016-01-14 00:10:06 +0200 |
| commit | 374e1947abcd3e127a2a613aff73ecffdb9199ea (patch) | |
| tree | d83973c3c9802450acd5b5e86fe0d4e8e60a3a1b /src/mongo/util/stacktrace.cpp | |
| parent | 65585c90b12d6523bea75a2aebaae2a2fdf9e641 (diff) | |
Imported Upstream version 2.6.11upstream/2.6.11
Diffstat (limited to 'src/mongo/util/stacktrace.cpp')
| -rw-r--r-- | src/mongo/util/stacktrace.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/util/stacktrace.cpp b/src/mongo/util/stacktrace.cpp index c1348a00240..4cfafe2fa01 100644 --- a/src/mongo/util/stacktrace.cpp +++ b/src/mongo/util/stacktrace.cpp @@ -13,6 +13,8 @@ * limitations under the License. */ +#include "mongo/platform/basic.h" + #include "mongo/util/stacktrace.h" #include <cstdlib> @@ -22,13 +24,13 @@ #include <vector> #include "mongo/util/log.h" +#include "mongo/util/concurrency/mutex.h" #ifdef _WIN32 #include <boost/filesystem/operations.hpp> #include <boost/smart_ptr/scoped_array.hpp> #include <sstream> #include <stdio.h> -#include "mongo/platform/windows_basic.h" #include <DbgHelp.h> #include "mongo/util/assert_util.h" #else @@ -274,13 +276,13 @@ namespace mongo { } } - // Print error message from C runtime followed by stack trace + // Print error message from C runtime, then fassert int crtDebugCallback(int, char* originalMessage, int*) { StringData message(originalMessage); log() << "*** C runtime error: " - << message.substr(0, message.find('\n')) << std::endl; - printStackTrace(); - return 1; // 0 == not handled, non-0 == handled + << message.substr(0, message.find('\n')) + << ", terminating" << std::endl; + fassertFailed( 17006 ); } } |
