forked from mia/Aegisub
Reenable the assertion failure handler
Originally committed to SVN as r6053.
This commit is contained in:
parent
28e8f0b640
commit
59273bac4a
2 changed files with 10 additions and 2 deletions
|
@ -154,11 +154,11 @@ void SetThreadName(DWORD dwThreadID, LPCSTR szThreadName) {
|
||||||
/// @param func Function name
|
/// @param func Function name
|
||||||
/// @param cond Condition
|
/// @param cond Condition
|
||||||
/// @param msg Message
|
/// @param msg Message
|
||||||
static void wxAssertHandler(const wxString &file, int line, const wxString &func, const wxString &cond, const wxString &msg) {
|
void AegisubApp::OnAssertFailure(const wxChar *file, int line, const wxChar *func, const wxChar *cond, const wxChar *msg) {
|
||||||
LOG_A("wx/assert") << file << ":" << line << ":" << func << "() " << cond << ": " << msg;
|
LOG_A("wx/assert") << file << ":" << line << ":" << func << "() " << cond << ": " << msg;
|
||||||
|
wxApp::OnAssertFailure(file, line, func, cond, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// @brief Gets called when application starts.
|
/// @brief Gets called when application starts.
|
||||||
/// @return bool
|
/// @return bool
|
||||||
bool AegisubApp::OnInit() {
|
bool AegisubApp::OnInit() {
|
||||||
|
|
|
@ -114,6 +114,14 @@ class AegisubApp: public wxApp {
|
||||||
void OnFatalException();
|
void OnFatalException();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/// @brief Handle wx assertions and redirect to the logging system.
|
||||||
|
/// @param file File name
|
||||||
|
/// @param line Line number
|
||||||
|
/// @param func Function name
|
||||||
|
/// @param cond Condition
|
||||||
|
/// @param msg Message
|
||||||
|
void OnAssertFailure(const wxChar *file, int line, const wxChar *func, const wxChar *cond, const wxChar *msg);
|
||||||
|
|
||||||
// This function wraps all event handler calls anywhere in the application and is
|
// This function wraps all event handler calls anywhere in the application and is
|
||||||
// our ticket to catch exceptions happening in event handlers.
|
// our ticket to catch exceptions happening in event handlers.
|
||||||
void HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent& event) const;
|
void HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent& event) const;
|
||||||
|
|
Loading…
Reference in a new issue