BitMiracle.LibJpeg.Classic.jpeg_error_mgr.error_exit C# (CSharp) Method

error_exit() public method

Receives control for a fatal error.
This method calls output_message and then throws an exception.
public error_exit ( ) : void
return void
        public virtual void error_exit()
        {
            // Always display the message
            output_message();

            string buffer = format_message();
            throw new Exception(buffer);
        }

Usage Example

Example #1
0
 /// <summary>
 /// Used for fatal errors (print message and exit).
 /// </summary>
 /// <param name="code">The message code.</param>
 /// <param name="args">The parameters of message.</param>
 public void ERREXIT(int code, params object[] args)
 {
     m_err.m_msg_code = code;
     m_err.m_msg_parm = args;
     m_err.error_exit();
 }