Package org.springframework.context

Examples of org.springframework.context.NoSuchMessageException


      Environment environment,
      Writer writer)
        throws TemplateException {
    try {
      if (exception.getCause().getClass() == NoSuchMessageException.class) {
        NoSuchMessageException ex = (NoSuchMessageException) exception.getCause();
        writer.write(ex.getMessage());
      } else {
        writer.write("Error: ");
        writer.write(exception.getMessage());
      }
    } catch (IOException ex) {
      log.warn(ex.getMessage(), ex);
    }
   
  }
View Full Code Here


    }
    String fallback = getDefaultMessage(code);
    if (fallback != null) {
      return fallback;
    }
    throw new NoSuchMessageException(code, locale);
  }
View Full Code Here

      String fallback = getDefaultMessage(codes[0]);
      if (fallback != null) {
        return fallback;
      }
    }
    throw new NoSuchMessageException(codes.length > 0 ? codes[codes.length - 1] : null, locale);
  }
View Full Code Here

    }
    String fallback = getDefaultMessage(code);
    if (fallback != null) {
      return fallback;
    }
    throw new NoSuchMessageException(code, locale);
  }
View Full Code Here

      String fallback = getDefaultMessage(codes[0]);
      if (fallback != null) {
        return fallback;
      }
    }
    throw new NoSuchMessageException(codes.length > 0 ? codes[codes.length - 1] : null, locale);
  }
View Full Code Here

  public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException {
    if (this.parentMessageSource != null) {
      return this.parentMessageSource.getMessage(code, args, locale);
    }
    else {
      throw new NoSuchMessageException(code, locale);
    }
  }
View Full Code Here

      if (resolvable.getDefaultMessage() != null) {
        return renderDefaultMessage(resolvable.getDefaultMessage(), resolvable.getArguments(), locale);
      }
      String[] codes = resolvable.getCodes();
      String code = (codes != null && codes.length > 0 ? codes[0] : null);
      throw new NoSuchMessageException(code, locale);
    }
  }
View Full Code Here

  public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException {
    if (this.parentMessageSource != null) {
      return this.parentMessageSource.getMessage(code, args, locale);
    }
    else {
      throw new NoSuchMessageException(code, locale);
    }
  }
View Full Code Here

      if (resolvable.getDefaultMessage() != null) {
        return resolvable.getDefaultMessage();
      }
      String[] codes = resolvable.getCodes();
      String code = (codes != null && codes.length > 0 ? codes[0] : null);
      throw new NoSuchMessageException(code, locale);
    }
  }
View Full Code Here

    }
    String fallback = getDefaultMessage(code);
    if (fallback != null) {
      return fallback;
    }
    throw new NoSuchMessageException(code, locale);
  }
View Full Code Here

TOP

Related Classes of org.springframework.context.NoSuchMessageException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.