Project

General

Profile

« Previous | Next » 

Revision 4862

Added by daigle over 15 years ago

Handle UtilException

View differences:

SchemaRegistryTest.java
48 48
import edu.ucsb.nceas.metacat.service.PropertyService;
49 49
import edu.ucsb.nceas.utilities.FileUtil;
50 50
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
51
import edu.ucsb.nceas.utilities.UtilException;
51 52
import junit.framework.Test;
52 53
import junit.framework.TestSuite;
53 54

  
......
639 640
	 */
640 641
	private String getTestDocument(String documentLocation) throws IOException,
641 642
			PropertyNotFoundException {
642
		String testDocument = FileUtil.readFileToString(documentLocation);
643
		String testDocument = null;
644
		try {
645
			testDocument = FileUtil.readFileToString(documentLocation);
646
		} catch (UtilException ue) {
647
			throw new IOException("Error reading file to string: " +  ue.getMessage());
648
		}
643 649

  
644 650
		String contextUrl = PropertyService.getProperty("test.contextUrl");
645 651
		testDocument = testDocument.replaceAll("@contextUrl@", contextUrl);

Also available in: Unified diff