Project

General

Profile

« Previous | Next » 

Revision 7091

add logging statements when there is a problem calling setReplicationStatus

View differences:

src/edu/ucsb/nceas/metacat/restservice/MNResourceHandler.java
661 661
				try {
662 662
			        MNodeService.getInstance(request).replicate(session, sysmeta, sourceNode);
663 663
				} catch (Exception e) {
664
					logMetacat.error("Error running replication: " + e.getMessage(), e);
664 665
					throw new RuntimeException(e.getMessage(), e);
665 666
				}
666 667
			}
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
1171 1171
                    status, failure);
1172 1172
            
1173 1173
        } catch (InvalidToken e) {
1174
            throw new ServiceFailure("2151",
1175
                    "Could not set the replication status on the CN (InvalidToken): " + 
1176
                    e.getMessage());
1174
        	String msg = "Could not set the replication status for " + pid.getValue() + " on the CN (InvalidToken): " + e.getMessage();
1175
            logMetacat.error(msg);
1176
        	throw new ServiceFailure("2151",
1177
                    msg);
1177 1178
            
1178 1179
        } catch (NotFound e) {
1179
            throw new ServiceFailure("2151",
1180
                    "Could not set the replication status on the CN (NotFound): " + 
1181
                    e.getMessage());
1180
        	String msg = "Could not set the replication status for " + pid.getValue() + " on the CN (NotFound): " + e.getMessage();
1181
            logMetacat.error(msg);
1182
        	throw new ServiceFailure("2151",
1183
                    msg);
1182 1184
            
1183 1185
        }
1184 1186

  

Also available in: Unified diff