All pastes #825829 Raw Edit

Anonymous

public text v1 · immutable
#825829 ·published 2007-12-20 20:47 UTC
rendered paste body
public class TryReturn {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		try {
			exceptionThower(false);
			return; //here
		} catch (BusinessException e) {
			//store exception
		}
		//or here
	}
	
	private static boolean exceptionThower(boolean shouldI) throws BusinessException {
		if (shouldI) {
			throw new BusinessException("Just for fun");
		}
		return shouldI;
	}

}