BitMiracle.LibJpeg.Classic.jpeg_common_struct.ERREXIT C# (CSharp) Method

ERREXIT() public method

Used for fatal errors (print message and exit).
public ERREXIT ( J_MESSAGE_CODE code ) : void
code J_MESSAGE_CODE The message code.
return void
        public void ERREXIT(J_MESSAGE_CODE code)
        {
            ERREXIT((int)code);
        }

Same methods

jpeg_common_struct::ERREXIT ( int code ) : void

Usage Example

Example #1
0
        /// <summary>
        /// Access the part of a virtual array.
        /// </summary>
        /// <param name="startRow">The first row in required block.</param>
        /// <param name="numberOfRows">The number of required rows.</param>
        /// <returns>The required part of virtual array.</returns>
        public T[][] Access(int startRow, int numberOfRows)
        {
            /* debugging check */
            if (startRow + numberOfRows > m_buffer.Length)
            {
                if (m_cinfo != null)
                    m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_VIRTUAL_ACCESS);
                else
                    throw new InvalidOperationException("Bogus virtual array access");
            }

            /* Return proper part of the buffer */
            T[][] ret = new T[numberOfRows][];
            for (int i = 0; i < numberOfRows; i++)
                ret[i] = m_buffer[startRow + i];

            return ret;
        }