Class UnsupportedFileFormatException
Der Name: Aspose.Note Zusammensetzung: Aspose.Note.dll (25.4.0)
Getrieben während der Dokumentladung, wenn das Dateiformat nicht erkannt oder nicht von Aspose.Note unterstützt wird.
public class UnsupportedFileFormatException : Exception, ISerializable
Inheritance
object ← Exception ← UnsupportedFileFormatException
Implements
Vererbte Mitglieder
Exception.GetBaseException() , Exception.ToString() , Exception.GetType() , Exception.TargetSite , Exception.Message , Exception.Data , Exception.InnerException , Exception.HelpLink , Exception.Source , Exception.HResult , Exception.StackTrace , Exception.SerializeObjectState , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Erläutert, wie Sie überprüfen können, ob eine Dokumentladung failliert ist, weil das OneNote 2007-Format nicht unterstützt wird.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "OneNote2007.one");
try
{
new Document(fileName);
}
catch (UnsupportedFileFormatException e)
{
if (e.FileFormat == FileFormat.OneNote2007)
{
Console.WriteLine("It looks like the provided file is in OneNote 2007 format that is not supported.");
}
else
throw;
}
Constructors
UnsupportedFileFormatException(Veröffentlichung, StreamingContext)
Initialisiert eine neue Instanz der Aspose.Note.UnsupportedFileFormatException Klasse.
protected UnsupportedFileFormatException(SerializationInfo serializationInfo, StreamingContext synchronizationContext)
Parameters
serializationInfo
SerializationInfo
Die Serieninformationen.
synchronizationContext
StreamingContext
Der Synchronisierungskontext.
Properties
FileFormat
Er erhält das Dateiformat der übermittelten Daten, wenn er entdeckt wird.
public FileFormat FileFormat { get; }
Eigentumswert
Examples
Erläutert, wie Sie überprüfen können, ob eine Dokumentladung failliert ist, weil das OneNote 2007-Format nicht unterstützt wird.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "OneNote2007.one");
try
{
new Document(fileName);
}
catch (UnsupportedFileFormatException e)
{
if (e.FileFormat == FileFormat.OneNote2007)
{
Console.WriteLine("It looks like the provided file is in OneNote 2007 format that is not supported.");
}
else
throw;
}