Project

General

Profile

« Previous | Next » 

Revision 6821

Simplify the error handling, and throw the exception once the CN is updated with the new status.

View differences:

src/edu/ucsb/nceas/metacat/dataone/MNodeService.java
504 504
            
505 505
            try {
506 506
                object = MetacatHandler.read(localId);
507
            } catch (PropertyNotFoundException e) {
508
                setReplicationStatus(thisNodeSession, pid, nodeId, ReplicationStatus.FAILED, serviceFailure);  
509 507
                
510
            } catch (ParseLSIDException e) {
508
            } catch (Exception e) {
509
                // let the CN know that the replication failed
511 510
                setReplicationStatus(thisNodeSession, pid, nodeId, ReplicationStatus.FAILED, serviceFailure);  
511
                throw serviceFailure;
512 512
                
513
            } catch (McdbException e) {
514
                setReplicationStatus(thisNodeSession, pid, nodeId, ReplicationStatus.FAILED, serviceFailure);  
515
                
516
            } catch (SQLException e) {
517
                setReplicationStatus(thisNodeSession, pid, nodeId, ReplicationStatus.FAILED, serviceFailure);  
518
                
519
            } catch (ClassNotFoundException e) {
520
                setReplicationStatus(thisNodeSession, pid, nodeId, ReplicationStatus.FAILED, serviceFailure);  
521
                
522
            } catch (IOException e) {
523
                setReplicationStatus(thisNodeSession, pid, nodeId, ReplicationStatus.FAILED, serviceFailure);  
524
               
525 513
            }
526 514

  
527 515
            // no local replica, get a replica

Also available in: Unified diff