Example #1
0
        private static List <MagickException>?CreateRelatedExceptions(IntPtr exception)
        {
            var nestedCount = NativeMagickExceptionHelper.RelatedCount(exception);

            if (nestedCount == 0)
            {
                return(null);
            }

            var result = new List <MagickException>();

            for (var i = 0; i < nestedCount; i++)
            {
                var nested = NativeMagickExceptionHelper.Related(exception, i);
                result.Add(CreateException(nested));
            }

            return(result);
        }
        private static List <MagickException> CreateRelatedExceptions(IntPtr exception)
        {
            List <MagickException> result = new List <MagickException>();

            int nestedCount = NativeMagickExceptionHelper.RelatedCount(exception);

            if (nestedCount == 0)
            {
                return(result);
            }

            for (int i = 0; i < nestedCount; i++)
            {
                IntPtr nested = NativeMagickExceptionHelper.Related(exception, i);
                result.Add(CreateException(nested));
            }

            return(result);
        }