C# Class BitMiracle.LibJpeg.Classic.jpeg_error_mgr

Show file Open project: prepare/HTML-Renderer Class Usage Examples

Public Methods

Method Description
emit_message ( int msg_level ) : void

Conditionally emit a trace or warning message.

The main reason for overriding this method would be to abort on warnings. This method calls output_message for message showing.
An application might override this method if it wanted to abort on warnings or change the policy about which messages to display.

error_exit ( ) : void

Receives control for a fatal error.

This method calls output_message and then throws an exception.

format_message ( ) : string

Constructs a readable error message string.

This method is called by output_message. Few applications should need to override this method. One possible reason for doing so is to implement dynamic switching of error message language.

jpeg_error_mgr ( ) : System

Initializes a new instance of the jpeg_error_mgr class.

output_message ( ) : void

Actual output of any JPEG message.

Override this to send messages somewhere other than Console. Note that this method does not know how to generate a message, only where to send it. For extending a generation of messages see format_message.

reset_error_mgr ( ) : void

Resets error manager to initial state.

This is called during compression startup to reset trace/error processing to default state. An application might possibly want to override this method if it has additional error processing state.

Protected Methods

Method Description
GetMessageText ( int code ) : string

Gets the actual message texts.

It may be useful for an application to add its own message texts that are handled by the same mechanism. You can override GetMessageText for this purpose. If you number the addon messages beginning at 1000 or so, you won't have to worry about conflicts with the library's built-in messages.

Method Details

GetMessageText() protected method

Gets the actual message texts.
It may be useful for an application to add its own message texts that are handled by the same mechanism. You can override GetMessageText for this purpose. If you number the addon messages beginning at 1000 or so, you won't have to worry about conflicts with the library's built-in messages.
protected GetMessageText ( int code ) : string
code int The message code. See for details.
return string

emit_message() public method

Conditionally emit a trace or warning message.
The main reason for overriding this method would be to abort on warnings. This method calls output_message for message showing.
An application might override this method if it wanted to abort on warnings or change the policy about which messages to display.
public emit_message ( int msg_level ) : void
msg_level int The message severity level.
/// Values are:
/// -1: recoverable corrupt-data warning, may want to abort.
/// 0: important advisory messages (always display to user).
/// 1: first level of tracing detail.
/// 2, 3, ...: successively more detailed tracing messages. ///
return void

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

format_message() public method

Constructs a readable error message string.
This method is called by output_message. Few applications should need to override this method. One possible reason for doing so is to implement dynamic switching of error message language.
public format_message ( ) : string
return string

jpeg_error_mgr() public method

Initializes a new instance of the jpeg_error_mgr class.
public jpeg_error_mgr ( ) : System
return System

output_message() public method

Actual output of any JPEG message.
Override this to send messages somewhere other than Console. Note that this method does not know how to generate a message, only where to send it. For extending a generation of messages see format_message.
public output_message ( ) : void
return void

reset_error_mgr() public method

Resets error manager to initial state.
This is called during compression startup to reset trace/error processing to default state. An application might possibly want to override this method if it has additional error processing state.
public reset_error_mgr ( ) : void
return void