Class UnsupportedFileFormatException
nazivni prostor: Aspose.Note Sastav: Aspose.Note.dll (25.4.0)
Prolazi tijekom opterećenja dokumenta, kada format datoteke nije prepoznat ili ne podržava Aspose.Note.
public class UnsupportedFileFormatException : Exception, ISerializable
Inheritance
object ← Exception ← UnsupportedFileFormatException
Implements
naslijeđeni članovi
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
Prikazuje kako provjeriti je li dokument neuspješan jer OneNote 2007 format nije podržan.
// 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(Sljedeći članakSreamingContext)
Inicijalizira novu primjenu Aspose.Note.UnsupportedFileFormatException klase.
protected UnsupportedFileFormatException(SerializationInfo serializationInfo, StreamingContext synchronizationContext)
Parameters
serializationInfo
SerializationInfo
Informacije o serijaliziranju.
synchronizationContext
StreamingContext
kontekst za sinhronizaciju.
Properties
FileFormat
Dobiva formatu datoteke prijenosnih podataka ako se otkrije.
public FileFormat FileFormat { get; }
Vrijednost nekretnina
Examples
Prikazuje kako provjeriti je li dokument neuspješan jer OneNote 2007 format nije podržan.
// 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;
}