Package org.ocpsoft.rewrite.exception

Examples of org.ocpsoft.rewrite.exception.RewriteException


         getResponse().getWriter().write("<h1>" + message + "</h1>");
         sendStatusCode(code);
      }
      catch (IOException e)
      {
         throw new RewriteException("Could not send HTTP status code.", e);
      }
   }
View Full Code Here


         abort();
      }
      catch (IOException e)
      {
         throw new RewriteException("Could not send HTTP error code.", e);
      }
   }
View Full Code Here

                  }
                  phaseBinding.convertedBy(converter);
                  if (parameter instanceof ParameterConfiguration)
                     ((ParameterConfiguration<?>) parameter).convertedBy(new DeferredConverter(converter));
                  else
                     throw new RewriteException("Cannot specify @" + Deferred.class.getSimpleName() + " to ["
                              + field + "] of class [" + field.getDeclaringClass() + "] because the parameter ["
                              + parameter.getName() + "] is not writable.");
               }

               Validator<?> validator = parameter.getValidator();
               if (validator != null)
               {
                  if (validator instanceof DeferredValidator)
                  {
                     validator = ((DeferredValidator) validator).getDeferred();
                  }
                  phaseBinding.validatedBy(validator);

                  if (parameter instanceof ParameterConfiguration)
                     ((ParameterConfiguration<?>) parameter).validatedBy(new DeferredValidator(validator));
                  else
                     throw new RewriteException("Cannot specify @" + Deferred.class.getSimpleName() + " to ["
                              + field + "] of class [" + field.getDeclaringClass() + "] because the parameter ["
                              + parameter.getName() + "] is not writable.");
               }

               // configure the target phase
View Full Code Here

      {
         try {
            return URLDecoder.decode(value, "UTF-8");
         }
         catch (UnsupportedEncodingException e) {
            throw new RewriteException("Encoding type UTF-8 is not supported by this JVM.", e);
         }
         catch (IllegalArgumentException e)
         {
            log.warn("Could not decode query parameter: " + value);
            return value;
View Full Code Here

      {
         try {
            return URLEncoder.encode(value, "UTF-8");
         }
         catch (UnsupportedEncodingException e) {
            throw new RewriteException("Encoding type UTF-8 is not supported by this JVM.", e);
         }
         catch (IllegalArgumentException e)
         {
            log.warn("Could not encode query parameter: " + value);
            return value;
View Full Code Here

TOP

Related Classes of org.ocpsoft.rewrite.exception.RewriteException

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.