sebb        2004/01/07 09:59:22

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/parser
                        HTMLParseException.java
  Log:
  Support getCause() in JDK1.3
  
  Revision  Changes    Path
  1.2       +19 -8     
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParseException.java
  
  Index: HTMLParseException.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/parser/HTMLParseException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HTMLParseException.java   25 Nov 2003 15:32:38 -0000      1.1
  +++ HTMLParseException.java   7 Jan 2004 17:59:22 -0000       1.2
  @@ -2,7 +2,7 @@
    * ====================================================================
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2004 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -57,12 +57,10 @@
    */
   package org.apache.jmeter.protocol.http.parser;
   
  -/**
  - * To change the template for this generated type comment go to
  - * Window>Preferences>Java>Code Generation>Code and Comments
  - */
   public class HTMLParseException extends Exception
   {
  +     private Throwable savedCause; //Support JDK1.4 getCause() on JDK1.3
  +     
       /**
        * 
        */
  @@ -84,7 +82,9 @@
        */
       public HTMLParseException(Throwable cause)
       {
  -        super(cause);
  +        //JDK1.4: super(cause);
  +        super();
  +        savedCause = cause;
       }
   
       /**
  @@ -93,6 +93,17 @@
        */
       public HTMLParseException(String message, Throwable cause)
       {
  -        super(message, cause);
  +        //JDK1.4: super(message, cause);
  +        super(message);
  +             savedCause = cause;
  +    }
  +    
  +    /**
  +     * Local verstion of getCause() for JDK1.3 support
  +     * 
  +     */
  +    public Throwable getCause()
  +    {
  +     return savedCause;
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to