[jboss-cvs] jboss-seam/src/main/org/jboss/seam/navigation ...
Peter Muir
peter at bleepbleep.org.uk
Tue Sep 4 10:26:21 EDT 2007
User: pmuir
Date: 07/09/04 10:26:21
Modified: src/main/org/jboss/seam/navigation SafeActions.java
Log:
Better exception messages
Revision Changes Path
1.5 +3 -3 jboss-seam/src/main/org/jboss/seam/navigation/SafeActions.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SafeActions.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/navigation/SafeActions.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- SafeActions.java 21 Jun 2007 05:27:29 -0000 1.4
+++ SafeActions.java 4 Sep 2007 14:26:21 -0000 1.5
@@ -59,12 +59,12 @@
if ( safeActions.contains(id) ) return true;
int loc = id.indexOf(':');
- if (loc<0) throw new IllegalArgumentException();
+ if (loc<0) throw new IllegalArgumentException("Invalid action method " + id);
String viewId = id.substring(0, loc);
String action = "\"#{" + id.substring(loc+1) + "}\"";
InputStream is = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream(viewId);
- if (is==null) throw new IllegalStateException();
+ if (is==null) throw new IllegalStateException("Unable to read view " + "/" + viewId);
BufferedReader reader = new BufferedReader( new InputStreamReader(is) );
try
{
@@ -80,7 +80,7 @@
}
catch (IOException ioe)
{
- throw new RuntimeException(ioe);
+ throw new RuntimeException("Error parsing view " + "/" + viewId, ioe);
}
finally
{
More information about the jboss-cvs-commits
mailing list