You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ge...@apache.org on 2005/05/03 02:14:13 UTC

svn commit: r167834 - in /struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib: AddTag.java GetAttributeTag.java InitDefinitionsTag.java InsertTag.java PutListTag.java PutTag.java util/TagUtils.java

Author: germuska
Date: Mon May  2 17:14:12 2005
New Revision: 167834

URL: http://svn.apache.org/viewcvs?rev=167834&view=rev
Log:
throw root cause exception wherever relevant when JspException is thrown, now that we are depending on JSP 1.2

Modified:
    struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/AddTag.java
    struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/GetAttributeTag.java
    struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InitDefinitionsTag.java
    struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InsertTag.java
    struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutListTag.java
    struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutTag.java
    struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/util/TagUtils.java

Modified: struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/AddTag.java
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/AddTag.java?rev=167834&r1=167833&r2=167834&view=diff
==============================================================================
--- struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/AddTag.java (original)
+++ struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/AddTag.java Mon May  2 17:14:12 2005
@@ -61,7 +61,7 @@
       }
      catch( ClassCastException ex )
       {
-      throw new JspException( "Error - tag add : enclosing tag doesn't accept 'add' tag." );
+      throw new JspException( "Error - tag add : enclosing tag doesn't accept 'add' tag." , ex);
       }
   }
 }

Modified: struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/GetAttributeTag.java
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/GetAttributeTag.java?rev=167834&r1=167833&r2=167834&view=diff
==============================================================================
--- struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/GetAttributeTag.java (original)
+++ struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/GetAttributeTag.java Mon May  2 17:14:12 2005
@@ -171,7 +171,7 @@
      catch( IOException ex )
       {
       ex.printStackTrace();
-      throw new JspException ( "Error - tag.getProperty : IOException ");
+      throw new JspException ( "Error - tag.getProperty : IOException ", ex);
       }
 
     return EVAL_PAGE;

Modified: struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InitDefinitionsTag.java
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InitDefinitionsTag.java?rev=167834&r1=167833&r2=167834&view=diff
==============================================================================
--- struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InitDefinitionsTag.java (original)
+++ struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InitDefinitionsTag.java Mon May  2 17:14:12 2005
@@ -86,7 +86,7 @@
    catch( DefinitionsFactoryException ex )
       {
       ex.printStackTrace();
-      throw new JspException( ex.getMessage() + " See console for details" );
+      throw new JspException( ex );
       }
   return SKIP_BODY;
   }

Modified: struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InsertTag.java
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InsertTag.java?rev=167834&r1=167833&r2=167834&view=diff
==============================================================================
--- struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InsertTag.java (original)
+++ struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/InsertTag.java Mon May  2 17:14:12 2005
@@ -405,7 +405,7 @@
 				controllerType);
 
 		} catch (InstantiationException ex) {
-			throw new JspException(ex.getMessage());
+			throw new JspException(ex);
 		}
 	}
 
@@ -571,7 +571,7 @@
 			throw new JspException(
 				"Error -  Tag Insert : Can't get definition '"
 					+ definitionName
-					+ "'. Check if this name exist in definitions factory.");
+					+ "'. Check if this name exist in definitions factory.", ex);
 
 		} catch (FactoryNotFoundException ex) {
 			throw new JspException(ex.getMessage());
@@ -586,7 +586,7 @@
 				Globals.EXCEPTION_KEY,
 				ex,
 				PageContext.REQUEST_SCOPE);
-			throw new JspException(ex.getMessage());
+			throw new JspException(ex);
 		}
 	}
 
@@ -632,7 +632,7 @@
 				controller);
 
 		} catch (InstantiationException ex) {
-			throw new JspException(ex.getMessage());
+			throw new JspException(ex);
 		}
 	}
 
@@ -908,7 +908,7 @@
 							+ e.getMessage();
 
 					log.error(msg, e);
-					throw new JspException(msg);
+					throw new JspException(msg,e);
 				}
 
 			} catch (ServletException e) {
@@ -921,7 +921,7 @@
 					"ServletException in '" + page + "': " + cause.getMessage();
 
 				log.error(msg, e);
-				throw new JspException(msg);
+				throw new JspException(msg,e);
 
 			} finally {
 				// restore old context only if currentContext not null 
@@ -967,7 +967,7 @@
 					ComponentConstants.EXCEPTION_KEY,
 					ex,
 					PageContext.REQUEST_SCOPE);
-				throw new JspException(msg);
+				throw new JspException(msg,ioex);
 			}
 		}
 	}
@@ -1043,7 +1043,7 @@
 					PageContext.REQUEST_SCOPE);
 
 				throw new JspException(
-					"Can't write string '" + value + "' : " + ex.getMessage());
+					"Can't write string '" + value + "' : " + ex.getMessage(), ex);
 			}
 
 			return EVAL_PAGE;

Modified: struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutListTag.java
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutListTag.java?rev=167834&r1=167833&r2=167834&view=diff
==============================================================================
--- struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutListTag.java (original)
+++ struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutListTag.java Mon May  2 17:14:12 2005
@@ -205,7 +205,7 @@
             return parent;
             
         } catch (ClassCastException ex) {
-            throw new JspException("Error - tag putList : enclosing tag doesn't accept 'putList' tag.");
+            throw new JspException("Error - tag putList : enclosing tag doesn't accept 'putList' tag.", ex);
         }
     }
 

Modified: struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutTag.java
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutTag.java?rev=167834&r1=167833&r2=167834&view=diff
==============================================================================
--- struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutTag.java (original)
+++ struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/PutTag.java Mon May  2 17:14:12 2005
@@ -396,7 +396,7 @@
                     + "' in scope '"
                     + beanScope
                     + "'. (exception : "
-                    + ex.getMessage());
+                    + ex.getMessage(), ex);
 
         } catch (InvocationTargetException ex) {
             throw new JspException(
@@ -407,7 +407,7 @@
                     + "' in scope '"
                     + beanScope
                     + "'. (exception : "
-                    + ex.getMessage());
+                    + ex.getMessage(), ex);
 
         } catch (IllegalAccessException ex) {
             throw new JspException(
@@ -418,7 +418,7 @@
                     + "' in scope '"
                     + beanScope
                     + "'. (exception : "
-                    + ex.getMessage());
+                    + ex.getMessage(), ex);
         }
     }
 
@@ -492,7 +492,7 @@
             return parent;
 
         } catch (ClassCastException ex) {
-            throw new JspException("Error - tag put : enclosing tag doesn't accept 'put' tag.");
+            throw new JspException("Error - tag put : enclosing tag doesn't accept 'put' tag.", ex);
         }
     }
 

Modified: struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/util/TagUtils.java
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/util/TagUtils.java?rev=167834&r1=167833&r2=167834&view=diff
==============================================================================
--- struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/util/TagUtils.java (original)
+++ struts/tiles/trunk/src/java/org/apache/struts/tiles/taglib/util/TagUtils.java Mon May  2 17:14:12 2005
@@ -243,7 +243,7 @@
                     + "' in scope '"
                     + beanScope
                     + "'. (exception : "
-                    + ex.getMessage());
+                    + ex.getMessage(), ex);
                     
         } catch (InvocationTargetException ex) {
             throw new JspException(
@@ -254,7 +254,7 @@
                     + "' in scope '"
                     + beanScope
                     + "'. (exception : "
-                    + ex.getMessage());
+                    + ex.getMessage(), ex);
                     
         } catch (IllegalAccessException ex) {
             throw new JspException(
@@ -265,7 +265,7 @@
                     + "' in scope '"
                     + beanScope
                     + "'. (exception : "
-                    + ex.getMessage());
+                    + ex.getMessage(), ex);
         }
     }
 
@@ -346,16 +346,16 @@
             throw new JspException(
                 "Error : Can't get component definition for '"
                     + name
-                    + "'. Check if this name exist in component definitions.");
+                    + "'. Check if this name exist in component definitions.",ex);
         } catch (FactoryNotFoundException ex) { // factory not found.
-            throw new JspException(ex.getMessage());
+            throw new JspException(ex);
             
         } catch (DefinitionsFactoryException ex) {
             if (debug)
                 ex.printStackTrace();
             // Save exception to be able to show it later
             saveException(pageContext, ex);
-            throw new JspException(ex.getMessage());
+            throw new JspException(ex);
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org