Bug 442451 - RCPTT Runtime catches event loop exceptions
Summary: RCPTT Runtime catches event loop exceptions
Status: NEW
Alias: None
Product: RCPTT
Classification: Technology
Component: Runtime (show other bugs)
Version: 1.5.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-25 00:38 EDT by Ivan Inozemtsev CLA
Modified: 2014-08-25 00:54 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Inozemtsev CLA 2014-08-25 00:38:48 EDT
In general that's probably good, however I've encountered a case when it actually does not allow to test actual application behavior:
1. An application has a bug in a handler for context menu
2. Application has a custom Exception handler dialog, which is shown via CustomWorkbenchAdvisor.eventLoopException
3. During recording, exception happens and user can record interactions with Error dialog
4. During replay, exception is caught and logged in AUT workspace log. Test case fails because it cannot find a dialog
Comment 1 Ivan Inozemtsev CLA 2014-08-25 00:52:05 EDT
One of possible "potentially safe" solutions I see is to use the same logic as for exec-with-options -allowStatusDialog:
1. When we record an interaction with window, we should understand that it appears because of unhandled event loop exception
2. If user interacts with this window, we should record exec-with-options so that during replay these exceptions are not being caught by our runtime


But maybe more correct behavior would be to throw away our exception catch logic, as it potentially hides unexpected internal errors. By the way, it is unclear why status dialogs appear when exec-with-options is turned on, as status dialog are shown through default WorkbenchAdvisor
Comment 2 Ivan Inozemtsev CLA 2014-08-25 00:54:25 EDT
By the way, there is an unnecessary duplication and inconsistency across SWTEvents#sendEvent(SWTUIElement w, final int event) and SWTEvents#sendEvent(SWTUIElement w, final int event, int x, int y) -- the second one does not catch all exceptions, it catches only SecurityException and IllegalArgumentException. Why?