Skip to content

Instantly share code, notes, and snippets.

@dsdstudio
Created July 26, 2012 07:39
Show Gist options
  • Save dsdstudio/3180782 to your computer and use it in GitHub Desktop.
Save dsdstudio/3180782 to your computer and use it in GitHub Desktop.
Exception 처리
public class ImageChartException extends Exception {
private static final long serialVersionUID = 2058807664126002021L;
public static final int DATAEXCEPTION = 0;
public static final int STATEEXCEPTION = 1;
private Integer type = DATAEXCEPTION;
public ImageChartException(Integer t) {
this.type = t;
}
@Override
public String getMessage() {
if ( this.type == DATAEXCEPTION)
return "오 쉣!!! 데이터 똑바로 넣으라고 했지?? 데이터 다시 함 확인해봐";
else if ( this.type == STATEEXCEPTION )
return "훽 !!! (render()) 렌더 메소드 2번 호출하면 안돼지..";
return "";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment