当前位置: 首页>>代码示例>>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;未经允许,请勿转载。