All pastes #825826 Raw Edit

Anonymous

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

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

}