report.info(null, FeatureEnum.FORMAT_VERSION, EPUBVersion.VERSION_2.toString());
return EPUBVersion.VERSION_2;
}
else if (InvalidVersionException.UNSUPPORTED_VERSION.equals(e.getMessage()))
{
throw new InvalidVersionException(InvalidVersionException.UNSUPPORTED_VERSION);
}
else if (InvalidVersionException.VERSION_ATTRIBUTE_NOT_FOUND.equals(e.getMessage()))
{
throw new InvalidVersionException(InvalidVersionException.VERSION_ATTRIBUTE_NOT_FOUND);
}
else if (InvalidVersionException.PACKAGE_ELEMENT_NOT_FOUND.equals(e.getMessage()))
{
throw new InvalidVersionException(InvalidVersionException.PACKAGE_ELEMENT_NOT_FOUND);
}
else
{
report.message(MessageId.RSC_005, new MessageLocation(path, -1, -1), e.getMessage());
}
}
catch (IOException e)
{
report.message(MessageId.PKG_008, new MessageLocation(path, -1, -1), path);
}
throw new InvalidVersionException(InvalidVersionException.VERSION_NOT_FOUND);
}