Package org.faceless.pdf2
Class ProfileComplianceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalStateException
-
- org.faceless.pdf2.ProfileComplianceException
-
- All Implemented Interfaces:
Serializable
public class ProfileComplianceException extends IllegalStateException
This exception is thrown when an action is not allowed based on the OutputProfile that is applied to the PDF - for example, if the PDF only allows CMYK colors and an attempt is made to add RGB to the page.
Prior to 2.24.3 this situation resulted in an
IllegalStateException
- for compatibility this class extends that exception type, but with additional information.- Since:
- 2.14
- See Also:
PDFReader.setSource(java.net.URL)
,LoadState
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProfileComplianceException(String msg, OutputProfile.Feature feature, boolean denied)
Create a nwe ProfileComplianceException
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDetail()
Return any additional detail on the fault.OutputProfile.Feature
getFeature()
Return the Feature that failedLocator
getLocator()
Return the locator of this exception, as set bysetLocator(org.xml.sax.Locator)
void
setDetail(String detail)
Set additional detail on the fault.void
setLocator(Locator locator)
Set the source of this exception as aLocator
.String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
ProfileComplianceException
public ProfileComplianceException(String msg, OutputProfile.Feature feature, boolean denied)
Create a nwe ProfileComplianceException- Parameters:
msg
- the messagefeature
- the feature that is disallowed or requireddenied
- if true, the feature was denied in the source profile
-
-
Method Detail
-
setDetail
public void setDetail(String detail)
Set additional detail on the fault.
-
getDetail
public String getDetail()
Return any additional detail on the fault.
-
getLocator
public Locator getLocator()
Return the locator of this exception, as set bysetLocator(org.xml.sax.Locator)
-
setLocator
public void setLocator(Locator locator)
Set the source of this exception as aLocator
. This Locator doesn't have to represent an XML file, it's just a convenient method of storing a filename (the system id), line number and column number.
-
getFeature
public OutputProfile.Feature getFeature()
Return the Feature that failed
-
-