FileCorruptedException
Inheritance: java.lang.Object, java.lang.Throwable, java.lang.Exception
public class FileCorruptedException extends Exception
Thrown during document load, when the document appears to be corrupted and impossible to load.
To learn more, visit the Programming with Documents documentation article.
Examples:
Shows how to catch a FileCorruptedException.
try {
// If we get an "Unreadable content" error message when trying to open a document using Microsoft Word,
// chances are that we will get an exception thrown when trying to load that document using Aspose.Words.
Document doc = new Document(getMyDir() + "Corrupted document.docx");
} catch (FileCorruptedException e) {
System.out.println(e.getMessage());
}
Methods
addSuppressed(Throwable arg0)
public final synchronized void addSuppressed(Throwable arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Throwable |
fillInStackTrace()
public synchronized Throwable fillInStackTrace()
Returns: java.lang.Throwable
getCause()
public synchronized Throwable getCause()
Returns: java.lang.Throwable
getLocalizedMessage()
public String getLocalizedMessage()
Returns: java.lang.String
getMessage()
public String getMessage()
Returns: java.lang.String
getStackTrace()
public StackTraceElement[] getStackTrace()
Returns: java.lang.StackTraceElement[]
getSuppressed()
public final synchronized Throwable[] getSuppressed()
Returns: java.lang.Throwable[]
initCause(Throwable arg0)
public synchronized Throwable initCause(Throwable arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Throwable |
Returns: java.lang.Throwable
printStackTrace()
public void printStackTrace()
printStackTrace(PrintStream arg0)
public void printStackTrace(PrintStream arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.io.PrintStream |
printStackTrace(PrintWriter arg0)
public void printStackTrace(PrintWriter arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.io.PrintWriter |
setStackTrace(StackTraceElement[] arg0)
public void setStackTrace(StackTraceElement[] arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.StackTraceElement[] |
toString()
public String toString()
Returns: java.lang.String