mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Improve crash reporting for C++ exceptions from keyDown:
This commit is contained in:
@@ -1865,6 +1865,17 @@ static void update_menu_key_equivalents (NSMenu* menu, action_to_key_t const& ac
|
||||
{
|
||||
D(DBF_OakTextView_TextInput, bug("%s\n", [[anEvent description] UTF8String]););
|
||||
crash_reporter_info_t info(text::format("%s %s", sel_getName(_cmd), to_s(anEvent).c_str()));
|
||||
try {
|
||||
[self realKeyDown:anEvent];
|
||||
}
|
||||
catch(std::exception const& e) {
|
||||
crash_reporter_info_t info(text::format("C++ Exception: %s", e.what()));
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
- (void)realKeyDown:(NSEvent*)anEvent
|
||||
{
|
||||
AUTO_REFRESH;
|
||||
if(!choiceMenu)
|
||||
return [self oldKeyDown:anEvent];
|
||||
|
||||
Reference in New Issue
Block a user