com.aspose.words

Class FileCorruptedException

  • java.lang.Exception
    • com.aspose.words.FileCorruptedException
public class FileCorruptedException 
extends java.lang.Exception

Thrown during document load, when the document appears to be corrupted and impossible to load.

Example:

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());
}