Revision 41823

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultFeature.java
112 112
        int i = attribute.getIndex();
113 113

  
114 114
        if ( attribute.isReadOnly() ) {
115
            throw new SetReadOnlyAttributeException();
115
            throw new SetReadOnlyAttributeException(attribute.getName(), this.getType());
116 116
        }
117 117
        FeatureAttributeEmulator emulator = attribute.getFeatureAttributeEmulator();
118 118
        if( emulator!= null ) {
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/exception/SetReadOnlyAttributeException.java
24 24
package org.gvsig.fmap.dal.feature.exception;
25 25

  
26 26
import org.gvsig.fmap.dal.exception.DataRuntimeException;
27
import org.gvsig.fmap.dal.feature.FeatureType;
27 28

  
28 29
/**
29 30
 * @author jmvivo
......
38 39
	private final static String MESSAGE_FORMAT = "Attribute '%(attribute)'[%(typename)] is read only.";
39 40
	private final static String MESSAGE_KEY = "_SetReadOnlyAttributeException";
40 41

  
41
	public SetReadOnlyAttributeException() {
42
	public SetReadOnlyAttributeException(String name, FeatureType type) {
42 43
		super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
44
                this.setValue("attribute", name);
45
                this.setValue("typename", type.getName());
43 46
	}
44 47
}

Also available in: Unified diff