cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/environment EnvironmentHelper.java
Date Mon, 05 Jan 2004 12:51:41 GMT
cziegeler    2004/01/05 04:51:41

  Modified:    src/java/org/apache/cocoon/environment
                        EnvironmentHelper.java
  Log:
  Throw ProcessingExceptions in case of missuse
  
  Revision  Changes    Path
  1.16      +7 -5      cocoon-2.2/src/java/org/apache/cocoon/environment/EnvironmentHelper.java
  
  Index: EnvironmentHelper.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/environment/EnvironmentHelper.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- EnvironmentHelper.java	5 Jan 2004 12:41:48 -0000	1.15
  +++ EnvironmentHelper.java	5 Jan 2004 12:51:41 -0000	1.16
  @@ -381,9 +381,10 @@
        */
       public static void enterProcessor(Processor processor,
                                         ServiceManager manager,
  -                                      Environment env) {
  +                                      Environment env) 
  +    throws ProcessingException {
           if ( null == processor) {
  -            throw new IllegalArgumentException("Processor is not set.");
  +            throw new ProcessingException("Processor is not set.");
           }
   
           EnvironmentStack stack = (EnvironmentStack)environmentStack.get();
  @@ -427,9 +428,10 @@
        *
        * @return A unique key within this thread.
        */
  -    public static Object startProcessing(Environment env) {
  +    public static Object startProcessing(Environment env) 
  +    throws ProcessingException {
           if ( null == env) {
  -            throw new RuntimeException("EnvironmentHelper.startProcessing: environment
must be set.");
  +            throw new ProcessingException("EnvironmentHelper.startProcessing: environment
must be set.");
           }
           final EnvironmentContext desc = new EnvironmentContext(env);
           env.getObjectModel().put(PROCESS_KEY, desc);
  
  
  

Mime
View raw message