~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to storage/falcon/Error.cpp

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "Log.h"
33
33
//#include "MemMgr.h"
34
34
 
35
 
#ifdef _WIN32
36
 
#define vsnprintf       _vsnprintf
37
 
#endif
 
35
 
38
36
 
39
37
//#define CHECK_HEAP
40
38
 
61
59
        if (vsnprintf (buffer, sizeof (buffer) - 1, string, args) < 0)
62
60
                buffer [sizeof (buffer) - 1] = 0;
63
61
 
64
 
#ifdef ENGINE
 
62
#ifdef FALCONDB
 
63
 
 
64
        // Always write unrecoverable error info to the error log
 
65
 
 
66
        fprintf (stderr, "[Falcon] Error: %s\n", buffer);
65
67
        Log::logBreak ("Bugcheck: %s\n", buffer);
66
68
        //MemMgrLogDump();
67
69
#endif
71
73
        throw SQLEXCEPTION (BUG_CHECK, buffer);
72
74
}
73
75
 
74
 
void Error::assertionFailed(const char * fileName, int line)
 
76
void Error::assertionFailed(const char *text, const char * fileName, int line)
75
77
{
76
 
        error ("assertion failed at line %d in file %s\n", line, fileName);
 
78
        error ("assertion (%s) failed at line %d in file %s\n", text, line, fileName);
77
79
}
78
80
 
79
81
void Error::validateHeap(const char *where)
89
91
#ifdef _WIN32
90
92
        DebugBreak();
91
93
#else
92
 
        raise (SIGILL);
 
94
        raise (SIGABRT);
93
95
#endif
94
96
}
95
97
 
96
98
void Error::notYetImplemented(const char *fileName, int line)
97
99
{
98
 
#ifdef ENGINE
 
100
#ifdef FALCONDB
99
101
        Log::logBreak ("feature not yet implemented at line %d in file %s\n", line, fileName);
100
102
#endif
101
103