aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/c_src/wxe_impl.cpp
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-06-30 12:53:02 +0200
committerDan Gudmundsson <[email protected]>2015-06-30 12:53:02 +0200
commit4246d988b53947c7a7f0ce4943a83af38d129435 (patch)
treef6e2859c8e9d0e55e5ae76f7c460cca2c0c1972a /lib/wx/c_src/wxe_impl.cpp
parent46285b9f6f9cbe102e22aaf6157e436797404f00 (diff)
downloadotp-4246d988b53947c7a7f0ce4943a83af38d129435.tar.gz
otp-4246d988b53947c7a7f0ce4943a83af38d129435.tar.bz2
otp-4246d988b53947c7a7f0ce4943a83af38d129435.zip
wx: Send wxWdigets assert to error logger
Instead of popping up an annoying msgbox
Diffstat (limited to 'lib/wx/c_src/wxe_impl.cpp')
-rw-r--r--lib/wx/c_src/wxe_impl.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
index 6236fb708e..e6ed236962 100644
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -181,6 +181,25 @@ void WxeApp::dummy_close(wxEvent& Ev) {
// windows open, and this will kill the erlang, override default handling
}
+void WxeApp::OnAssertFailure(const wxChar *file, int line, const wxChar *cfunc,
+ const wxChar *cond, const wxChar *cmsgUser) {
+ wxString msg;
+ wxString func(cfunc);
+ wxString msgUser(cmsgUser);
+
+ msg.Printf(wxT("wxWidgets Assert failure: %s(%d): \"%s\""),
+ file, line, cond);
+ if ( !func.empty() ) {
+ msg << wxT(" in ") << func << wxT("()");
+ }
+ // and the message itself
+ if ( !msgUser.empty() ) {
+ msg << wxT(" : ") << msgUser;
+ }
+
+ send_msg("error", &msg);
+}
+
// Called by wx thread
void WxeApp::idle(wxIdleEvent& event) {
event.Skip(true);