package com.agiledeveloper;

class KnownException extends Exception {}

public class AJavaClass {
  public <T> void someService(java.util.concurrent.Callable<T> block) throws Exception {
    try {
      block.call();
    }
    catch(KnownException ex) {
      System.out.println("Known exception caught...");
    }
  }

  public void someMethod() throws KnownException {
    throw new KnownException();
  }
}
