public class SpecificException extends Exception {
public SpecificException() {
super();
}
}
public class Exemplo {
public void compute(Object subject) throws SpecificException {
if (subject == null){
throw new SpecificException();
}
}
public void declaresException(Object o) throws Exception {
compute(o);
}
}
|
|