Class UnsupportedFileFormatException
Именује се: Aspose.Note Асамблеја: Aspose.Note.dll (25.4.0)
Пролази током пуњења докумената, када формат датотеке није препознат или не подржава Aspose.Note.
public class UnsupportedFileFormatException : Exception, ISerializable
Inheritance
object ← Exception ← UnsupportedFileFormatException
Implements
Наслеђени чланови
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
Показује како да проверите да ли је додатак документа неуспешан јер формат OneNote 2007 није подржана.
// 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(СеријализацијаИнфо, СтрејмингКонтекст)
Иницијалише нову инстанцију Aspose.Note.UnsupportedFileFormatException класа.
protected UnsupportedFileFormatException(SerializationInfo serializationInfo, StreamingContext synchronizationContext)
Parameters
serializationInfo
SerializationInfo
Информације о серијализацији.
synchronizationContext
StreamingContext
Контекст синхронизације.
Properties
FileFormat
Добије формат датотеке пренесених података ако се открије.
public FileFormat FileFormat { get; }
Вредност имовине
Examples
Показује како да проверите да ли је додатак документа неуспешан јер формат OneNote 2007 није подржана.
// 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;
}