src/main.cpp

changeset 247
1a2ca515f683
parent 237
ec77f6e9a19f
child 261
c4ad4e3c6839
equal deleted inserted replaced
246:56226ddd4ad3 247:1a2ca515f683
132 box.setDefaultButton (btn); 132 box.setDefaultButton (btn);
133 box.exec (); 133 box.exec ();
134 } 134 }
135 135
136 void assertionFailure (const char* file, const ulong line, const char* funcname, const char* expr) { 136 void assertionFailure (const char* file, const ulong line, const char* funcname, const char* expr) {
137 str errmsg = fmt ("File %s:%lu:\nFunction %s:\n\nAssertion `%s' failed", 137 str errmsg = fmt ("File %s\nLine: %lu:\nFunction %s:\n\nAssertion `%s' failed",
138 file, line, funcname, expr); 138 file, line, funcname, expr);
139 139
140 #if BUILD_ID == BUILD_INTERNAL 140 #if BUILD_ID == BUILD_INTERNAL
141 errmsg += ", aborting."; 141 errmsg += ", aborting.";
142 #else 142 #else
153 abort (); 153 abort ();
154 #endif 154 #endif
155 } 155 }
156 156
157 void fatalError (const char* file, const ulong line, const char* funcname, str msg) { 157 void fatalError (const char* file, const ulong line, const char* funcname, str msg) {
158 str errmsg = fmt ("fatal() called:\nFile: %s\nLine: %lu\nFunction: %s\n\n%s", 158 str errmsg = fmt ("Aborting over a call to fatal():\nFile: %s\nLine: %lu\nFunction: %s\n\n%s",
159 file, line, funcname, msg.chars ()); 159 file, line, funcname, msg.chars ());
160 160
161 printf ("%s\n", errmsg.chars ()); 161 printf ("%s\n", errmsg.chars ());
162 162
163 if (g_win) 163 if (g_win)

mercurial