Esempio n. 1
0
        private Exception WrapCOMException(Exception ex)
        {
            var returnEx = ex;

            if (ex is COMException comEx)
            {
                var lastApiError = Api.GetLastError();

                returnEx = new EnhancedCOMException(lastApiError, comEx);
            }

            return(returnEx);
        }
Esempio n. 2
0
        private Exception WrapCOMException(Exception ex)
        {
            Exception returnEx = ex;

            COMException comEx = ex as COMException;

            if (comEx != null)
            {
                String lastApiError = Api.GetLastError();

                returnEx = new EnhancedCOMException(comEx, lastApiError);
            }

            return(returnEx);
        }