Class UnsupportedFileFormatException
Nombre del espacio: Aspose.Note Asamblea: Aspose.Note.dll (25.4.0)
Transcurrido durante la carga de documentos, cuando el formato de archivo no es reconocido o no se apoya por Aspose.Note.
public class UnsupportedFileFormatException : Exception, ISerializable
Inheritance
object ← Exception ← UnsupportedFileFormatException
Implements
Miembros heredados
Exception.GetBaseException() ,y, Exception.ToString() ,y, Exception.GetType() ,y, Exception.TargetSite ,y, Exception.Message ,y, Exception.Data ,y, Exception.InnerException ,y, Exception.HelpLink ,y, Exception.Source ,y, Exception.HResult ,y, Exception.StackTrace ,y, Exception.SerializeObjectState ,y, object.GetType() ,y, object.MemberwiseClone() ,y, object.ToString() ,y, object.Equals(object?) ,y, object.Equals(object?, object?) ,y, object.ReferenceEquals(object?, object?) ,y, object.GetHashCode()
Examples
Mostra cómo verificar si un cargamento de documento falló porque el formato de OneNote 2007 no está soportado.
// 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(SiguienteSiguienteSiguienteSiguienteSiguienteStreamingContext)
Inicia una nueva instancia de la clase Aspose.Note.UnsupportedFileFormatExcepción.
protected UnsupportedFileFormatException(SerializationInfo serializationInfo, StreamingContext synchronizationContext)
Parameters
serializationInfo
SerializationInfo
La información de la seriedad.
synchronizationContext
StreamingContext
Contexto de sincronización.
Properties
FileFormat
Obtenga el formato de archivo de los datos transmitidos si se detecta.
public FileFormat FileFormat { get; }
Valor de la propiedad
Examples
Mostra cómo verificar si un cargamento de documento falló porque el formato de OneNote 2007 no está soportado.
// 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;
}