develog

UserException 본문

Dev/Java

UserException

냐옴 2013. 6. 11. 19:16

public class UserException extends RuntimeException {

    

    public UserException(String msg) {

        super(msg + ", at " + getInfoSrcLn());

    }

    

    private static String getInfoSrcLn() {

        StackTraceElement[] stackTraces = Thread.currentThread().getStackTrace();

        StackTraceElement stackTraceElement = stackTraces[3];

        return String.valueOf(stackTraceElement);

    }

    

}

'Dev > Java' 카테고리의 다른 글

System Properties  (0) 2013.06.12
java mail  (0) 2013.06.12
excel open protected password in jacob  (0) 2013.06.08
getAbsolutePath, getCanonicalPath  (0) 2013.06.08
Jacob  (0) 2013.06.08
Comments