congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ValidationException
Code IndexAdd Tabnine to your IDE (free)

How to use
ValidationException
in
colesico.framework.validation

Best Java code snippets using colesico.framework.validation.ValidationException (Showing top 3 results out of 315)

origin: net.colesico.framework/colesico-restlet

protected void handleValidationError(ValidationException ex, int httpCode, HttpContext context) {
  String errMsg = MessageFormat.format("Restlet validation error: {0}", ExceptionUtils.getRootCauseMessage(ex));
  log.error(errMsg);
  RestletErrorResponse response = new RestletErrorResponse(context.getRequest().getRequestURI(), httpCode, ex.getIssue());
  restletDataPort.sendError(response, httpCode);
}
origin: net.colesico.framework/colesico-validation

/**
 * Validates the value. Throws exception if validation errors occurred
 *
 * @param value
 * @throws ValidationException if some validation errors occurred
 */
@Override
public void accept(V value) throws ValidationException {
  ValidationContext<V> context = ValidationContext.ofRoot(rootSubject, value);
  rootCommand.execute(context);
  ValidationIssue issue = context.toIssue();
  if (issue != null) {
    throw new ValidationException(issue);
  }
}
origin: net.colesico.framework/colesico-htmlrenderer

public static Notice error(Exception ex) {
  if (ex instanceof ValidationException) {
    return new Notice(Type.ERROR, ((ValidationException) ex).getIssue());
  }
  if (ex instanceof ApplicationException) {
    return new Notice(Type.ERROR, ex.getMessage());
  }
  return new Notice(Type.ERROR, ExceptionUtils.getRootCauseMessage(ex));
}
colesico.framework.validationValidationException

Most used methods

  • getIssue
  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • JComboBox (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now