BitMiracle.LibTiff.Classic.Tiff.Warning C# (CSharp) Method

Warning() public static method

Invokes the library-wide warning handling methods to (normally) write a warning message to the Console.Error.

The format is a composite format string that uses the same format as O:System.String.Format method. The method parameter, if not null, is printed before the message; it typically is used to identify the method in which a warning is detected.

Applications that desire to capture control in the event of a warning should use SetErrorHandler to override the default error and warning handler.

public static Warning ( Tiff tif, string method, string format ) : void
tif Tiff An instance of the class. Can be null.
method string The method in which a warning is detected.
format string A composite format string (see Remarks).
return void
        public static void Warning(Tiff tif, string method, string format, params object[] args)
        {
            TiffErrorHandler errorHandler = getErrorHandler(tif);
            if (errorHandler == null)
                return;

            errorHandler.WarningHandler(tif, method, format, args);
            errorHandler.WarningHandlerExt(tif, null, method, format, args);
        }

Same methods

Tiff::Warning ( string method, string format ) : void

Usage Example

Example #1
0
        private bool writeOK(byte[] buffer, int offset, int count)
        {
            try
            {
                m_stream.Write(m_clientdata, buffer, offset, count);
            }
            catch (Exception)
            {
                Tiff.Warning(this, "writeOK", "Failed to write {0} bytes", count);
                return(false);
            }

            return(true);
        }
All Usage Examples Of BitMiracle.LibTiff.Classic.Tiff::Warning
Tiff