5 types derived from ExternalException
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\CheckoutException.cs (1)
17public class CheckoutException : ExternalException
System.Data.Common (1)
System\Data\Common\DbException.cs (1)
10public abstract class DbException : System.Runtime.InteropServices.ExternalException
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (1)
18public class Win32Exception : ExternalException
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\COMException.cs (1)
18public class COMException : ExternalException
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SEHException.cs (1)
15public class SEHException : ExternalException
23 instantiations of ExternalException
System.CodeDom (1)
System\CodeDom\Compiler\Executor.cs (1)
90throw new ExternalException(SR.Format(SR.ExecTimeout, cmd), WAIT_TIMEOUT);
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (1)
974throw new ExternalException(SR.Arg_ExternalException);
System.Private.Windows.Core (10)
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
144throw new ExternalException(SR.ExternalException, (int)HRESULT.E_OUTOFMEMORY);
System\Private\Windows\Ole\Composition.NativeToRuntimeAdapter.cs (1)
61throw new ExternalException(SR.ExternalException, (int)HRESULT.E_NOTIMPL);
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (8)
26return new ExternalException(SR.GdiplusGenericError, (int)HRESULT.E_FAIL); 37return new ExternalException(SR.GdiplusInvalidOperation, (int)HRESULT.E_UNEXPECTED); 45return new ExternalException(SR.GdiplusGenericError, (int)HRESULT.E_FAIL); 49return new ExternalException(SR.GdiplusAborted, (int)HRESULT.E_ABORT); 55return new ExternalException(SR.GdiplusAccessDenied, (int)HRESULT.E_ACCESSDENIED); 76return new ExternalException(SR.GdiplusUnsupportedGdiplusVersion, (int)HRESULT.E_FAIL); 79return new ExternalException(SR.GdiplusNotInitialized, (int)HRESULT.E_FAIL); 82return new ExternalException($"{SR.GdiplusUnknown} [{status}]", (int)HRESULT.E_UNEXPECTED);
System.Windows.Forms (11)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1837internal static void ThrowHr(HRESULT hr) => throw new ExternalException(SR.ExternalException, (int)hr);
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
914throw new ExternalException(errorText, (int)setError);
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (6)
289throw new ExternalException(string.Format(SR.TYPEINFOPROCESSORGetTypeAttrFailed, hr), (int)hr); 354throw new ExternalException(string.Format(SR.TYPEINFOPROCESSORGetRefTypeInfoFailed, hr), (int)hr); 368throw new ExternalException(string.Format(SR.TYPEINFOPROCESSORGetTypeAttrFailed, hr), (int)hr); 602throw new ExternalException(string.Format(SR.TYPEINFOPROCESSORGetTypeAttrFailed, hr), (int)hr); 699throw new ExternalException(string.Format(SR.TYPEINFOPROCESSORGetTypeAttrFailed, hr), (int)hr); 828throw new ExternalException(string.Format(SR.TYPEINFOPROCESSORGetTypeAttrFailed, hr), (int)hr);
System\Windows\Forms\OLE\Clipboard.cs (3)
51throw new ExternalException(SR.ClipboardOperationFailed, (int)result); 64throw new ExternalException(SR.ClipboardOperationFailed, (int)result); 78throw new ExternalException(SR.ClipboardOperationFailed, (int)result);
73 references to ExternalException
Microsoft.CodeAnalysis.EditorFeatures (1)
StringCopyPaste\WpfStringCopyPasteService.cs (1)
53catch (ExternalException ex) when ((uint)ex.ErrorCode == CLIPBRD_E_CANT_OPEN)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
689[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ExternalException))]
netstandard (1)
netstandard.cs (1)
1694[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ExternalException))]
PresentationFramework (10)
System\Windows\Controls\DataGrid.cs (1)
8288catch (ExternalException)
System\Windows\Controls\InkCanvas.cs (2)
1857catch (ExternalException) 2075catch (ExternalException)
System\Windows\Documents\RubberbandSelector.cs (1)
173catch (System.Runtime.InteropServices.ExternalException)
System\windows\Documents\TextEditorCopyPaste.cs (5)
291catch (ExternalException) 337catch (ExternalException) 375catch (ExternalException) 588catch (ExternalException) 863catch (ExternalException)
System\Windows\FrameworkCompatibilityPreferences.cs (1)
341/// a <see cref="System.Runtime.InteropServices.ExternalException"/>.
System.Drawing.Common (2)
System\Drawing\Image.cs (1)
64catch (Exception e) when (e is ExternalException
System\Drawing\SystemFonts.cs (1)
139ex is not (ExternalException
System.Drawing.Common.Tests (48)
System\Drawing\BitmapTests.cs (11)
439Assert.Throws<ExternalException>(() => bitmap.Clone(new Rectangle(x, y, width, height), bitmap.PixelFormat)); 440Assert.Throws<ExternalException>(() => bitmap.Clone(new RectangleF(x, y, width, height), bitmap.PixelFormat)); 455Assert.Throws<ExternalException>(() => bitmap.Clone(new Rectangle(0, 0, 1, 1), format)); 456Assert.Throws<ExternalException>(() => bitmap.Clone(new RectangleF(0, 0, 1, 1), format)); 463Assert.Throws<ExternalException>(() => bitmap.Clone(new Rectangle(0, 0, 1, 1), PixelFormat.Format32bppArgb)); 464Assert.Throws<ExternalException>(() => bitmap.Clone(new RectangleF(0, 0, 1, 1), PixelFormat.Format32bppArgb)); 654Assert.Throws<ExternalException>(() => Image.FromHbitmap(IntPtr.Zero)); 655Assert.Throws<ExternalException>(() => Image.FromHbitmap(10)); 898catch (ExternalException) 1241Assert.Throws<ExternalException>(() => bitmap.UnlockBits(new BitmapData())); 1251Assert.Throws<ExternalException>(() => bitmap.UnlockBits(new BitmapData()));
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (2)
71Assert.Throws<ExternalException>(() => new LinearGradientBrush(new Point(x, y), new Point(x, y), Color.Fuchsia, Color.GhostWhite)); 72Assert.Throws<ExternalException>(() => new LinearGradientBrush(new PointF(x, y), new PointF(x, y), Color.Fuchsia, Color.GhostWhite));
System\Drawing\Drawing2D\MatrixTests.cs (4)
148Assert.Throws<ExternalException>(() => new Matrix(new Rectangle(1, 1, 0, 1), new Point[3])); 149Assert.Throws<ExternalException>(() => new Matrix(new RectangleF(1, 1, 0, 1), new PointF[3])); 155Assert.Throws<ExternalException>(() => new Matrix(new Rectangle(1, 1, 1, 0), new Point[3])); 156Assert.Throws<ExternalException>(() => new Matrix(new RectangleF(1, 1, 1, 0), new PointF[3]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (2)
115Assert.Throws<ExternalException>(() => new PathGradientBrush(path)); 117Assert.Throws<ExternalException>(() => new PathGradientBrush(path));
System\Drawing\GraphicsTests.cs (8)
117Assert.Throws<ExternalException>(() => Graphics.FromHdcInternal(IntPtr.Zero)); 123Assert.Throws<ExternalException>(() => Graphics.FromHdc(IntPtr.Zero, 10)); 129Assert.Throws<ExternalException>(() => Graphics.FromHwnd(10)); 130Assert.Throws<ExternalException>(() => Graphics.FromHwndInternal(10)); 235Assert.Throws<ExternalException>(() => Graphics.FromHdc(10)); 236Assert.Throws<ExternalException>(() => Graphics.FromHdcInternal(10)); 287Assert.Throws<ExternalException>(() => Graphics.FromImage(image)); 296Assert.Throws<ExternalException>(() => Graphics.FromImage(image));
System\Drawing\ImageTests.cs (6)
152Assert.Throws<ExternalException>(() => bitmap.RemovePropertyItem(PropertyTagChrominanceTable)); 172Assert.Throws<ExternalException>(() => bitmap.RemovePropertyItem(PropertyTagChrominanceTable)); 182Assert.Throws<ExternalException>(() => bitmap.RemovePropertyItem(propid)); 192Assert.Throws<ExternalException>(() => bitmap.RemovePropertyItem(propid)); 498Assert.Throws<ExternalException>(() => Image.FromFile(file.Path)); 499Assert.Throws<ExternalException>(() => Image.FromFile(file.Path, useEmbeddedColorManagement: true));
System\Drawing\Imaging\ImageAttributesTests.cs (2)
1099Assert.Throws<ExternalException>(() => imageAttr.SetOutputChannelColorProfile("invalidPath")); 1100Assert.Throws<ExternalException>(() => imageAttr.SetOutputChannelColorProfile("invalidPath", ColorAdjustType.Default));
System\Drawing\Imaging\MetafileTests.cs (4)
50Assert.Throws<ExternalException>(() => new Metafile(metafile.GetHenhmetafile(), false)); 63Assert.Throws<ExternalException>(() => new Metafile(GetPath(BmpFile))); 75Assert.Throws<ExternalException>(() => new Metafile("fileNotExist")); 111Assert.Throws<ExternalException>(() => new Metafile(stream));
System\Drawing\RegionTests.cs (2)
142Assert.Throws<ExternalException>(() => new Region(regionData)); 151Assert.Throws<ExternalException>(() => new Region(regionData));
System\Drawing\Text\PrivateFontCollectionTests.cs (1)
122AssertExtensions.Throws<FileNotFoundException, ExternalException>(() => fontCollection.AddFontFile(AppContext.BaseDirectory));
System\Drawing\TextureBrushTests.cs (6)
292Assert.Throws<ExternalException>(() => new TextureBrush(image, rectangle)); 293Assert.Throws<ExternalException>(() => new TextureBrush(image, (RectangleF)rectangle)); 294Assert.Throws<ExternalException>(() => new TextureBrush(image, WrapMode.Tile, rectangle)); 295Assert.Throws<ExternalException>(() => new TextureBrush(image, WrapMode.Tile, (RectangleF)rectangle)); 296Assert.Throws<ExternalException>(() => new TextureBrush(image, rectangle, null)); 297Assert.Throws<ExternalException>(() => new TextureBrush(image, (RectangleF)rectangle, null));
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
666[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.ExternalException))]
System.Runtime.Caching (1)
System\Runtime\Caching\Dbg.cs (1)
28e is ExternalException ee ? "Exception " + e + Environment.NewLine + "_hr=0x" + ee.ErrorCode.ToString("x", CultureInfo.InvariantCulture) :
System.Windows.Forms (4)
System\Windows\Forms\ActiveX\AxHost.cs (1)
2309catch (ExternalException e)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1086errorCode = e is ExternalException ee ? (HRESULT)ee.ErrorCode : HRESULT.E_FAIL;
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (2)
414catch (ExternalException ex) 424catch (ExternalException ex)
System.Windows.Forms.Design.Tests (1)
System\Drawing\Design\MetafileEditorTests.cs (1)
62Assert.Throws<ExternalException>(() => editor.LoadFromStream(stream));
System.Windows.Forms.Interop.Tests (2)
PropertyGridTests.cs (2)
31catch (ExternalException ex) 65catch (ExternalException ex)
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataObjectTests.cs (1)
2418((Action)(() => comDataObject.EnumFormatEtc(dwDirection))).Should().Throw<ExternalException>();