java.util.logging

Class ErrorManager


  • public class ErrorManager
    extends Object
    ErrorManager objects can be attached to Handlers to process any error that occurs on a Handler during Logging.

    When processing logging output, if a Handler encounters problems then rather than throwing an Exception back to the issuer of the logging call (who is unlikely to be interested) the Handler should call its associated ErrorManager.

    • Field Detail

      • GENERIC_FAILURE

        public static final int GENERIC_FAILURE
        GENERIC_FAILURE is used for failure that don't fit into one of the other categories.
        See Also:
        Constant Field Values
      • WRITE_FAILURE

        public static final int WRITE_FAILURE
        WRITE_FAILURE is used when a write to an output stream fails.
        See Also:
        Constant Field Values
      • FLUSH_FAILURE

        public static final int FLUSH_FAILURE
        FLUSH_FAILURE is used when a flush to an output stream fails.
        See Also:
        Constant Field Values
      • CLOSE_FAILURE

        public static final int CLOSE_FAILURE
        CLOSE_FAILURE is used when a close of an output stream fails.
        See Also:
        Constant Field Values
      • OPEN_FAILURE

        public static final int OPEN_FAILURE
        OPEN_FAILURE is used when an open of an output stream fails.
        See Also:
        Constant Field Values
      • FORMAT_FAILURE

        public static final int FORMAT_FAILURE
        FORMAT_FAILURE is used when formatting fails for any reason.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ErrorManager

        public ErrorManager()
    • Method Detail

      • error

        public void error(String msg,
                 Exception ex,
                 int code)
        The error method is called when a Handler failure occurs.

        This method may be overridden in subclasses. The default behavior in this base class is that the first call is reported to System.err, and subsequent calls are ignored.

        Parameters:
        msg - a descriptive string (may be null)
        ex - an exception (may be null)
        code - an error code defined in ErrorManager

Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-java/util/logging/errormanager.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut