From 97cf5197cf5b882b2c689d8dc2b555f2edf8f418 Mon Sep 17 00:00:00 2001 From: Dave Wilson Date: Tue, 17 Mar 2015 19:50:07 -0700 Subject: Initial publish --- print/XpsRasFilter/src/Exception.cpp | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 print/XpsRasFilter/src/Exception.cpp (limited to 'print/XpsRasFilter/src/Exception.cpp') diff --git a/print/XpsRasFilter/src/Exception.cpp b/print/XpsRasFilter/src/Exception.cpp new file mode 100644 index 00000000..141c1ac3 --- /dev/null +++ b/print/XpsRasFilter/src/Exception.cpp @@ -0,0 +1,43 @@ +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF +// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +// +// Copyright (c) Microsoft Corporation. All rights reserved +// +// File Name: +// +// Exception.cpp +// +// Abstract: +// +// Exception routine definitions. +// + +#include "precomp.h" +#include "WppTrace.h" +#include "Exception.h" + +#include "Exception.tmh" + +namespace xpsrasfilter +{ + +void ThrowHRException( + HRESULT hr, + char const *fileName, + int lineNum + ) +{ + DoTraceMessage( + XPSRASFILTER_TRACE_ERROR, + L"Throwing HRESULT Exception from %s:%d (HRESULT=%!HRESULT!)", + fileName, + lineNum, + hr + ); + + throw hr_error(hr); +} + +} // namespace xpsrasfilter -- cgit v1.3.1