Author: simoneg
Date: Fri Jan 29 15:23:53 2010
New Revision: 904519
URL: http://svn.apache.org/viewvc?rev=904519&view=rev
Log:
Tell me the exception when setting the primary key
Modified:
labs/magma/trunk/foundation-database/src/main/java/org/apache/magma/database/DatabaseIdentity.java
Modified:
labs/magma/trunk/foundation-database/src/main/java/org/apache/magma/database/DatabaseIdentity.java
URL:
http://svn.apache.org/viewvc/labs/magma/trunk/foundation-database/src/main/java/org/apache/magma/database/DatabaseIdentity.java?rev=904519&r1=904518&r2=904519&view=diff
==============================================================================
---
labs/magma/trunk/foundation-database/src/main/java/org/apache/magma/database/DatabaseIdentity.java
(original)
+++
labs/magma/trunk/foundation-database/src/main/java/org/apache/magma/database/DatabaseIdentity.java
Fri Jan 29 15:23:53 2010
@@ -108,7 +108,7 @@
idfield.set(bean, value);
return;
} catch (Exception e) {
- throw new MagmaException("Error setting the
field {0}.{1}, which is key for the class {2}",
idfield.getDeclaringClass().getName(), idfield.getName(), myclass.getName());
+ throw new MagmaException(e, "Error setting the
field {0}.{1}, which is key for the class {2}",
idfield.getDeclaringClass().getName(), idfield.getName(), myclass.getName());
}
}
if (idgetter != null) {
@@ -120,7 +120,7 @@
method.invoke(bean, value);
return;
} catch (Exception e) {
- throw new MagmaException("Error callong method
{0}.{1}, which is key setter for the class {2}", idgetter.getDeclaringClass(),
name, myclass.getName());
+ throw new MagmaException(e, "Error callong
method {0}.{1}, which is key setter for the class {2}",
idgetter.getDeclaringClass(), name, myclass.getName());
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]