Project

General

Profile

« Previous | Next » 

Revision 6893

Convert SQLExceptions to RuntimeExceptions for Hazelcast MapStore operations.

View differences:

src/edu/ucsb/nceas/metacat/dataone/hazelcast/SystemMetadataMap.java
1 1
package edu.ucsb.nceas.metacat.dataone.hazelcast;
2 2

  
3
import java.sql.SQLException;
3 4
import java.util.Collection;
4 5
import java.util.HashMap;
5 6
import java.util.Map;
......
46 47
			//System.out.println("Storing System Metadata to store: " + pid.getValue());
47 48
			if (!IdentifierManager.getInstance().systemMetadataExists(pid.getValue())) {
48 49
				IdentifierManager.getInstance().createSystemMetadata(sm);
50
				
49 51
			} else {
50 52
				IdentifierManager.getInstance().updateSystemMetadata(sm);
53
				
51 54
			}
55
			
52 56
		} catch (McdbDocNotFoundException e) {
53 57
			throw new RuntimeException(e.getMessage(), e);
54
		}
58
			
59
		} catch (SQLException e) {
60
	      throw new RuntimeException(e.getMessage(), e);
61
	      
62
    }
55 63
	}
56 64

  
57 65
	@Override

Also available in: Unified diff