本文整理汇总了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());
}
}
示例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());
}
}
示例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());
}
}