class ValidationException extends RuntimeException {

    @Override
    public String getMessage() {
        StringBuilder sb = new StringBuilder();
        
        String msg = super.getMessage();
        if(msg != null) {
            sb.append(msg).append('\n');
        }

        if(causes != null) {
            for(Throwable t : causes) {
                if(t != null) {
                    msg = t.getMessage();
                    sb.append((msg == null) ? t.getClass().getName() : msg).append('\n');
                }
            }
        }

        int len = sb.length(); 
        return (len == 0) ? getClass().getName() : sb.deleteCharAt(len - 1).toString();
    }

    public  ValidationException(Throwable cause);
    public  ValidationException(String message, Throwable cause);
    public  ValidationException(String message, Throwable[] causes);
    public  ValidationException(String message, List<? extends Throwable> causes);
    public  ValidationException(String message);
    public  ValidationException(Throwable[] causes);
    public  ValidationException(List<? extends Throwable> causes);

}