62 instantiations of FileFormatException
PresentationCore (29)
MS\Internal\FontCache\FontCacheUtil.cs (1)
837throw new FileFormatException(new Uri(fileName));
MS\Internal\FontFace\CompositeFontParser.cs (2)
872throw new FileFormatException(new Uri(_reader.BaseURI, UriKind.RelativeOrAbsolute), x); 942throw new FileFormatException(new Uri(fileName, UriKind.RelativeOrAbsolute), message, innerException);
MS\Internal\FontFace\FontDriver.cs (3)
144throw new FileFormatException(SourceUri, e); 188throw new FileFormatException(SourceUri); 212throw new FileFormatException(SourceUri, e);
MS\Internal\Shaping\OpenTypeCommon.cs (1)
985throw new FileFormatException();
MS\Internal\Shaping\OpenTypeLayout.cs (6)
146if ((offset + 1) >= m_length) throw new FileFormatException(); 153if ((offset + 1) >= m_length) throw new FileFormatException(); 160if ((offset + 3) >= m_length) throw new FileFormatException(); 167if ((offset+1)>=m_length) throw new FileFormatException(); 1247throw new FileFormatException(); 1263throw new FileFormatException();
MS\Internal\Shaping\Substitution.cs (1)
232throw new FileFormatException();
MS\Internal\Text\TextInterface\DWriteUtil.cs (1)
28throw new System.IO.FileFormatException();
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (11)
804return new System.IO.FileFormatException(null, SR.Image_UnknownFormat, exceptionForHR); 845return new System.IO.FileFormatException(null, SR.Image_DecoderError, exceptionForHR); 848return new System.IO.FileFormatException(null, SR.Image_HeaderError, exceptionForHR); 878return new System.IO.FileFormatException(null, SR.Image_UnexpectedMetadataType, exceptionForHR); 881return new System.IO.FileFormatException(null, SR.Image_RequestOnlyValidAtMetadataRoot, exceptionForHR); 887return new System.IO.FileFormatException(null, SR.Image_DuplicateMetadataPresent, exceptionForHR); 890return new System.IO.FileFormatException(null, SR.Image_PropertyUnexpectedType, exceptionForHR); 893return new System.IO.FileFormatException(null, SR.Image_TooMuchMetadata, exceptionForHR); 905return new System.IO.FileFormatException(null, SR.Image_InvalidColorContext, exceptionForHR); 936return new System.IO.FileFormatException(SR.Media_FileFormatNotSupported, exceptionForHR); 939return new System.IO.FileFormatException(SR.Media_PlaylistFormatNotSupported, exceptionForHR);
System\Windows\Media\GlyphTypeface.cs (1)
145throw new System.IO.FileFormatException(typefaceSource);
System\Windows\Media\Imaging\BitmapDecoder.cs (2)
93throw new FileFormatException(bitmapUri, SR.Image_CantDealWithUri); 137throw new FileFormatException(null, SR.Image_CantDealWithStream);
PresentationFramework (22)
System\Windows\Documents\FixedDocument.cs (3)
880throw new FileFormatException(SR.InvalidDSContentType); 909throw new FileFormatException(SR.InvalidSFContentType); 913throw new FileFormatException(SR.InvalidStoryFragmentsMarkup);
System\Windows\Documents\FixedSchema.cs (14)
45throw new FileFormatException(SR.XpsValidatingLoaderUnsupportedEncoding); 52throw new FileFormatException(SR.XpsValidatingLoaderUnsupportedEncoding); 214throw new FileFormatException(SR.XpsValidatingLoaderUnsupportedRootNamespaceUri); 324throw new FileFormatException(SR.XpsValidatingLoaderUnsupportedMimeType); 550throw new FileFormatException(SR.XpsValidatingLoaderMoreThanOnePrintTicketPart); 561throw new FileFormatException(SR.XpsValidatingLoaderPrintTicketHasIncorrectType); 572throw new FileFormatException(SR.XpsValidatingLoaderMoreThanOneThumbnailPart); 584throw new FileFormatException(SR.XpsValidatingLoaderThumbnailHasIncorrectType); 604throw new FileFormatException(SR.XpsValidatingLoaderRestrictedFontHasIncorrectType); 620throw new FileFormatException(SR.XpsValidatingLoaderMoreThanOneDiscardControlInPackage); 631throw new FileFormatException(SR.XpsValidatingLoaderDiscardControlHasIncorrectType); 643throw new FileFormatException(SR.XpsValidatingLoaderMoreThanOneThumbnailInPackage); 655throw new FileFormatException(SR.XpsValidatingLoaderThumbnailHasIncorrectType); 694throw new FileFormatException(SR.XpsValidatingLoaderUnsupportedMimeType);
System\Windows\Documents\XPSS0ValidatingLoader.cs (5)
81throw new FileFormatException(SR.XpsValidatingLoaderUriNotInSamePackage); 137throw new FileFormatException(SR.XpsValidatingLoaderUnsupportedMimeType); 179throw new FileFormatException(SR.XpsValidatingLoaderDuplicateReference); 207throw new FileFormatException(SR.XpsValidatingLoaderUnlistedResource); 212throw new FileFormatException(SR.XpsValidatingLoaderUnsupportedMimeType);
PresentationUI (2)
MS\Internal\Documents\RightsManagementManager.cs (1)
1403new FileFormatException());
MS\Internal\Documents\RightsManagementProvider.cs (1)
1278throw new FileFormatException(
System.IO.Packaging (9)
System\IO\Packaging\InternalRelationshipCollection.cs (1)
565throw new FileFormatException(SR.RelationshipPartIncorrectContentType);
System\IO\Packaging\Package.cs (1)
428throw new FileFormatException(SR.BadPackageFormat);
System\IO\Packaging\PackagingUtilities.cs (1)
53throw new FileFormatException(SR.EncodingNotSupported);
System\IO\Packaging\PartBasedPackageProperties.cs (4)
441throw new FileFormatException(SR.NoExternalTargetForMetadataRelationship); 449throw new FileFormatException(SR.DanglingMetadataRelationship); 454throw new FileFormatException(SR.WrongContentTypeForPropertyPart); 469throw new FileFormatException(SR.MoreThanOneMetadataRelationships);
System\IO\Packaging\ZipPackage.cs (2)
370throw new FileFormatException(SR.ZipZeroSizeFileIsNotValidArchive); 406throw new FileFormatException(SR.FileContainsCorruptedData);
19 references to FileFormatException
PresentationCore (11)
MS\Internal\Shaping\OpenTypeLayout.cs (7)
316catch (FileFormatException) 333catch (FileFormatException) 369catch (FileFormatException) 387catch (FileFormatException) 915catch (FileFormatException) 992catch (FileFormatException) 1121catch (FileFormatException)
MS\Internal\Shaping\OpenTypeLayoutCache.cs (1)
343catch (FileFormatException)
System\Windows\Media\FontFamily.cs (1)
520catch (FileFormatException)
System\Windows\Media\Imaging\BitmapImage.cs (1)
552catch (FileFormatException)
System\Windows\Media\Imaging\BitmapSource.cs (1)
1126catch (FileFormatException)
PresentationFramework (3)
MS\Internal\IO\Packaging\XpsFilter.cs (1)
425catch (FileFormatException ex)
System\Windows\ColorConvertedBitmapExtension.cs (1)
122catch (FileFormatException)
System\Windows\Documents\WpfPayload.cs (1)
341catch (System.IO.FileFormatException)
PresentationUI (1)
MS\Internal\Documents\Application\RightsManagementErrorHandler.cs (1)
258(exception is System.IO.FileFormatException))
System.IO.Packaging (1)
System\IO\Packaging\Package.cs (1)
383/// <exception cref="FileFormatException">The package has a bad format.</exception>
WindowsBase (1)
WindowsBase.cs (1)
10[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileFormatException))]
WindowsBase.Tests (2)
System\IO\Packaging\EncryptedPackageEnvelopeTests.cs (2)
43Assert.Throws<FileFormatException>(() => EncryptedPackageEnvelope.Open(stream)); 51Assert.Throws<FileFormatException>(() => EncryptedPackageEnvelope.Open(stream));