You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/11/23 10:28:51 UTC
svn commit: r478519 -
/lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/usecase/AbstractUsecase.java
Author: andreas
Date: Thu Nov 23 01:28:50 2006
New Revision: 478519
URL: http://svn.apache.org/viewvc?view=rev&rev=478519
Log:
Improved error message when part is null in AbstractUsecase.setPart()
Modified:
lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/usecase/AbstractUsecase.java
Modified: lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/usecase/AbstractUsecase.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/usecase/AbstractUsecase.java?view=diff&rev=478519&r1=478518&r2=478519
==============================================================================
--- lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/usecase/AbstractUsecase.java (original)
+++ lenya/trunk/src/modules-core/usecase/java/src/org/apache/lenya/cms/usecase/AbstractUsecase.java Thu Nov 23 01:28:50 2006
@@ -475,7 +475,11 @@
*/
public void setPart(String name, Part value) {
if (!Part.class.isInstance(value)) {
- throw new RuntimeException("[" + value.getClass() + "]Â [" + value
+ String className = "";
+ if (value != null) {
+ className = value.getClass().getName();
+ }
+ throw new RuntimeException("[" + name +"] = (" + className + ") [" + value
+ "] is not a part object. Maybe you have to enable uploads?");
}
setParameter(name, value);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org