Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to catch an OutOfMemoryException while XpsDocumentWriter.WriteAsync() ?

$
0
0

Hi,

I want to print some XPS documents.

Sometimes (if the document is pretty large) an OutOfMemoryException is thrown.

Unfortunately the whole application crushes in that case.

I want to catch such exceptions and display a MessageBox.

How to do that?

Thanks for your help,

Jan


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>