Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357511 - Exception thrown by the delegate function is never caught
Summary: Exception thrown by the delegate function is never caught
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-13 11:20 EDT by Jing Qian CLA
Modified: 2017-02-23 14:17 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jing Qian CLA 2011-09-13 11:20:15 EDT
try this in RBD and EDT, you will see different results

RBD is correct, the exception thrown by delegate function is being caught 
EDT is wrong, the exception thrown by delegate can not be caught by user. 

package c;

Record JingException type Exception
end

delegate runTest()
end

// basic program
//
program SimpleException type BasicProgram {}
	
	
	function main()
		d runTest = testFunction;
		try
			d();
		onException(exp JingException)
			sysLib.writeStdOut ("JingException caught, reason: " + exp.message);
		onException(exp AnyException)
			sysLib.writeStdOUt ("JingException NOT cought, that's wrong!!");
		end
	end
	
	function testFunction()
		throw new JingException{message = "I failed"};
	end
end
Comment 1 Jeff Douglas CLA 2011-09-14 12:19:03 EDT
fixed
Comment 2 Lisa Lasher CLA 2011-11-09 14:13:35 EST
This high severity defect was fixed several weeks ago, so I am closing.