package databook.config;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

public class IrodsConfig {
	private static final String BUNDLE_NAME = "databook.config.irods"; //$NON-NLS-1$

	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
			.getBundle(BUNDLE_NAME);

	private IrodsConfig() {
	}

	public static String getString(String key) {
		try {
			return RESOURCE_BUNDLE.getString(key);
		} catch (MissingResourceException e) {
			return '!' + key + '!';
		}
	}
	public static int getInt(String key) {
		try {
			return Integer.parseInt(RESOURCE_BUNDLE.getString(key)) ;
		} catch (MissingResourceException e) {
			return -1;
		}
	}
}

@@ -23,51 +23,8 @@
 g;%0A%0A
-import java.util.MissingResourceException;%0A
 impo
@@ -333,32 +333,24 @@
 ring key) %7B%0A
-%09%09try %7B%0A
 %09%09%09return RE
@@ -383,80 +383,8 @@
 y);%0A
-%09%09%7D catch (MissingResourceException e) %7B%0A%09%09%09return '!' + key + '!';%0A%09%09%7D%0A
 %09%7D%0A%09
@@ -426,16 +426,8 @@
 ) %7B%0A
-%09%09try %7B%0A
 %09%09%09r
@@ -487,67 +487,8 @@
 ) ;%0A
-%09%09%7D catch (MissingResourceException e) %7B%0A%09%09%09return -1;%0A%09%09%7D%0A
 %09%7D%0A%7D

make config class throw exceptions on missing property