Link to home
Start Free TrialLog in
Avatar of MK15
MK15

asked on

Java exception bubble up

Hey Everyone,

wondering if i can get some help re bubbling up an exception to the calling method please?

pseudo code:-

public boolean test() {

try {
	evaluateExp(something);
} catch (Exeption e)
	//i need to get the exception to bubble up to here
}

public void evaluateExp(String Expression) {
	try {
		do something with expression 
	} catch (Exception e) {
		prints exception
	}
}

Open in new window


Thanks,
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

throw new RuntimeException(e);

Open in new window

where you have 'prints exception' as a comment
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial