当前位置: 首页>>代码示例>>Java>>正文


Java VoidRepositoryException.getCause方法代码示例

本文整理汇总了Java中fr.lip6.move.pnml.framework.utils.exception.VoidRepositoryException.getCause方法的典型用法代码示例。如果您正苦于以下问题:Java VoidRepositoryException.getCause方法的具体用法?Java VoidRepositoryException.getCause怎么用?Java VoidRepositoryException.getCause使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fr.lip6.move.pnml.framework.utils.exception.VoidRepositoryException的用法示例。


在下文中一共展示了VoidRepositoryException.getCause方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: importPnmlFile

import fr.lip6.move.pnml.framework.utils.exception.VoidRepositoryException; //导入方法依赖的package包/类
/**
 * Imports PNML document using PNML Framework.
 * 
 * @param file
 *            the PNML file
 * @throws ValidationException
 *             something went wrong during validation.
 * @throws InvalidFileException
 *             invalid file
 * @throws InvalidFileTypeException
 *             file type is wrong
 */
private void importPnmlFile(File file) throws ValidationException, InvalidFileException, InvalidFileTypeException {

	try {

		final PnmlImport pim = new PnmlImport();
		pim.setFallUse(false);
		pim.enableOclChecking();
		this.imported = (HLAPIRootClass) pim.importFile(file.getCanonicalPath());
		determineNetType();

	} catch (IOException ioe) {
		throw new InvalidFileException(ioe.getMessage(), ioe.getCause());
	} catch (BadFileFormatException bffe) {
		throw new InvalidFileTypeException(bffe.getMessage(), bffe.getCause());
	} catch (UnhandledNetType unte) {
		throw new ValidationException(unte.getMessage(), unte.getCause());
	} catch (ValidationFailedException vfe) {
		throw new ValidationException(vfe.getMessage(), vfe.getCause());
	} catch (InnerBuildException ibe) {
		throw new ValidationException(ibe.getMessage(), ibe.getCause());
	} catch (OCLValidationFailed oclve) {
		throw new ValidationException(oclve.getMessage(), oclve.getCause());
	} catch (OtherException oe) {
		throw new ValidationException(oe.getMessage(), oe.getCause());
	} catch (AssociatedPluginNotFound apnfe) {
		throw new ValidationException(apnfe.getMessage(), apnfe.getCause());
	} catch (InvalidIDException iie) {
		throw new ValidationException(iie.getMessage(), iie.getCause());
	} catch (VoidRepositoryException vre) {
		throw new ValidationException(vre.getMessage(), vre.getCause());
	} catch (Exception e) {
		ValidationMain.printStackTrace(e);
		throw new ValidationException(e.getMessage(), e.getCause());
	}

}
 
开发者ID:lip6,项目名称:pnmlframework,代码行数:49,代码来源:CheckPnmlFileImpl.java

示例2: dispose

import fr.lip6.move.pnml.framework.utils.exception.VoidRepositoryException; //导入方法依赖的package包/类
/**
 * Closes the PFW workspace in which this thread was working.
 * 
 * @throws ValidationException
 *             something went wrong during validation
 */
public final void dispose() throws ValidationException {
	try {
		modelRepo.destroyCurrentWorkspace();
	} catch (VoidRepositoryException e) {
		throw new ValidationException(e.getMessage(), e.getCause());
	}
}
 
开发者ID:lip6,项目名称:pnmlframework,代码行数:14,代码来源:CheckPnmlFileImpl.java

示例3: importPnmlDocument

import fr.lip6.move.pnml.framework.utils.exception.VoidRepositoryException; //导入方法依赖的package包/类
/**
 * Imports a PNML document using PNML Framework.
 * A workspace is automatically created to hold the reference to
 * the imported Petri Net Document. A unique id is generate for that
 * workspace. If you want to retrieve it for later reference, use
 * {@link ModelRepository#getCurrentDocWSId()}.
 * 
 * @param file
 *            the PNML file
 * @param fallback
 *            shall the fallback mechanism of PNML Framework used? (i.e.
 *            fall back to a compatible standardized type if the discovered
 *            one is unknown, in a best effort strategy).
 * @return the root class of the loaded Petri net Document, which must be an
 *         instance of PetriNetDoc (whatever the Petri net type).
 * @throws InvalidIDException
 *             invalid id for the document workspace
 * @throws ImportException
 *             some errors occurred during the import process
 */
public static final HLAPIRootClass importPnmlDocument(File file,
		boolean fallback) throws ImportException, InvalidIDException {

	try {

		final PnmlImport pim = new PnmlImport();
		pim.setFallUse(fallback);
		HLAPIRootClass imported = (HLAPIRootClass) pim.importFile(file
				.getCanonicalPath());
		return imported;

	} catch (IOException ioe) {
		throw new InvalidIDException(ioe.getMessage(), ioe.getCause());
	} catch (BadFileFormatException bffe) {
		throw new InvalidIDException(bffe.getMessage(), bffe.getCause());
	} catch (UnhandledNetType unte) {
		throw new ImportException(unte.getMessage(), unte.getCause());
	} catch (ValidationFailedException vfe) {
		throw new ImportException(vfe.getMessage(), vfe.getCause());
	} catch (InnerBuildException ibe) {
		throw new ImportException(ibe.getMessage(), ibe.getCause());
	} catch (OCLValidationFailed oclve) {
		throw new ImportException(oclve.getMessage(), oclve.getCause());
	} catch (OtherException oe) {
		throw new ImportException(oe.getMessage(), oe.getCause());
	} catch (AssociatedPluginNotFound apnfe) {
		throw new ImportException(apnfe.getMessage(), apnfe.getCause());
	} catch (InvalidIDException iie) {
		throw new ImportException(iie.getMessage(), iie.getCause());
	} catch (VoidRepositoryException vre) {
		throw new ImportException(vre.getMessage(), vre.getCause());
	} catch (Exception e) {
		e.printStackTrace();
		throw new ImportException(e.getMessage(), e.getCause());
	}

}
 
开发者ID:lip6,项目名称:pnmlframework,代码行数:58,代码来源:PNMLUtils.java


注:本文中的fr.lip6.move.pnml.framework.utils.exception.VoidRepositoryException.getCause方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。