當前位置: 首頁>>代碼示例>>Java>>正文


Java ConfigurationException.printStackTrace方法代碼示例

本文整理匯總了Java中org.apache.commons.configuration.ConfigurationException.printStackTrace方法的典型用法代碼示例。如果您正苦於以下問題:Java ConfigurationException.printStackTrace方法的具體用法?Java ConfigurationException.printStackTrace怎麽用?Java ConfigurationException.printStackTrace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.commons.configuration.ConfigurationException的用法示例。


在下文中一共展示了ConfigurationException.printStackTrace方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getInstance

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
/**
 * gets instance
 * @return {@link AppConfiguration} instance
 */
public static CommonConfiguration getInstance(){
	if (_commonConfig == null) {
		try{
			_commonConfig = new CommonConfiguration();
			_commonConfig.reloadConfiguration();
			return _commonConfig;
		} catch(ConfigurationException e){
			LOG.severe("KH: "+e.getMessage());
			e.printStackTrace();
			return null;
		}			
	} else {
		return _commonConfig;
	}
}
 
開發者ID:roscisz,項目名稱:KernelHive,代碼行數:20,代碼來源:CommonConfiguration.java

示例2: addURLToPreviousURLs

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
public void addURLToPreviousURLs(String url) {
	boolean isNew = true;
	config.setListDelimiter(',');
	List<Object> list = config.getList(PREVIOUS_INPUT_DATA_URLS);
	List<String> urls = new ArrayList<String>();
	for (Object o : list) {
		urls.add((String) o);
	}
	for (String u : urls) {
		if (u.equalsIgnoreCase(url)) {
			isNew = false;
			break;
		}
	}
	if (isNew) {
		list.add(url);
		config.clearProperty(PREVIOUS_INPUT_DATA_URLS);
		config.addProperty(PREVIOUS_INPUT_DATA_URLS, list);
		try {
			config.save();
		} catch (ConfigurationException e) {
			e.printStackTrace();
		}
	}
}
 
開發者ID:roscisz,項目名稱:KernelHive,代碼行數:26,代碼來源:AppConfiguration.java

示例3: saveContent

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
@Override
public boolean saveContent() {
	try {
		project.save();
		setDirty(false);
		if (getTabPanel() != null) {
			getTabPanel().getLabel().setText(name);
		}
		return true;
	} catch (final ConfigurationException e) {
		LOG.warning("KH: could not save graph to file: "
				+ project.getProjectFile().getAbsolutePath());
		e.printStackTrace();
	}
	return false;
}
 
開發者ID:roscisz,項目名稱:KernelHive,代碼行數:17,代碼來源:WorkflowEditor.java

示例4: getInstance

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
/**
 * gets instance
 * 
 * @return {@link AppConfiguration} instance
 */
public static RemoteRepositoryConfiguration getInstance() {
	if (_commonConfig == null) {
		try {
			_commonConfig = new RemoteRepositoryConfiguration();
			_commonConfig.reloadConfiguration();
			return _commonConfig;
		} catch (final ConfigurationException e) {
			LOG.severe("KH: " + e.getMessage());
			e.printStackTrace();
			return null;
		}
	} else {
		return _commonConfig;
	}
}
 
開發者ID:roscisz,項目名稱:KernelHive,代碼行數:21,代碼來源:RemoteRepositoryConfiguration.java

示例5: setProperty

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
public void setProperty(String key, Object val) {
    propertiesConfiguration.setProperty(key, val);
    try {
        propertiesConfiguration.save();
    } catch (ConfigurationException e) {
        e.printStackTrace();
    }
}
 
開發者ID:yu199195,項目名稱:happylifeplat-transaction,代碼行數:9,代碼來源:ConfigHelper.java

示例6: init

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
public static void init(String configFilePath) {
    try {
        defultConfigFilePath = configFilePath;
        config = new PropertiesConfiguration(defultConfigFilePath);
    } catch (ConfigurationException e) {
        e.printStackTrace();
    }
}
 
開發者ID:JiuzhouSec,項目名稱:nightwatch,代碼行數:9,代碼來源:Configuration.java

示例7: putProperty

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
public static void putProperty(String key, String value) {
    validatePropertySource();
    properties.setProperty(key, value);
    try {
        properties.save();
    } catch (ConfigurationException e) {
        e.printStackTrace();
    }
}
 
開發者ID:NVIvanov,項目名稱:jrbuilder,代碼行數:10,代碼來源:ReportUtil.java

示例8: saveProject

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
/**
 * saves project
 */
public void saveProject() {
	if (project != null) {
		try {
			project.save();
		} catch (final ConfigurationException e) {
			LOG.warning("KH: could not save project");
			e.printStackTrace();
		}
	}
}
 
開發者ID:roscisz,項目名稱:KernelHive,代碼行數:14,代碼來源:MainFrameController.java

示例9: newProject

import org.apache.commons.configuration.ConfigurationException; //導入方法依賴的package包/類
/**
 * creates new project
 */
public void newProject() {

	final NewProjectDialog npd = new NewProjectDialog();
	npd.setVisible(true);
	if (npd.getStatus() == NewProjectDialog.APPROVE_OPTION) {
		try {
			final File projectDir = new File(npd.getProjectDirectory()
					+ System.getProperty("file.separator")
					+ npd.getProjectName());
			project = new KernelHiveProject(projectDir,
					npd.getProjectName());
			project.initProject();
			frame.setTitle(npd.getProjectName() + " - "
					+ BUNDLE.getString("MainFrame.this.title"));

			final FileTreeModel model = new FileTreeModel(
					project.getProjectDirectory());
			final FileTree tree = new FileTree(frame, model);
			tree.setCellRenderer(new FileCellRenderer(tree
					.getCellRenderer()));
			frame.setProjectTree(tree);
			frame.getProjectScrollPane().setViewportView(
					frame.getProjectTree());

			final IKernelRepository repository = new KernelRepository(
					AppConfiguration.getInstance().getKernelRepositoryURL());
			final ListModel repoModel = new RepositoryViewerModel(
					repository.getEntries());
			frame.setRepositoryList(new RepositoryViewer(repoModel));
			frame.getRepositoryScrollPane().setViewportView(
					frame.getRepositoryList());

			frame.getBtnStart().setEnabled(true);

			openWorkflowEditor();

		} catch (final ConfigurationException e) {
			LOG.warning("KH: cannot create new project");
			MessageDialog
					.showErrorDialog(
					frame,
					BUNDLE.getString("MainFrameController.newProject.cannotCreate.title"),
					BUNDLE.getString("MainFrameController.newProject.cannotCreate.text"));
			e.printStackTrace();
		}
	}
}
 
開發者ID:roscisz,項目名稱:KernelHive,代碼行數:51,代碼來源:MainFrameController.java


注:本文中的org.apache.commons.configuration.ConfigurationException.printStackTrace方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。