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 Summary

      Fields 
      Modifier and Type Field and Description
      static int CLOSE_FAILURE
      CLOSE_FAILURE is used when a close of an output stream fails.
      static int FLUSH_FAILURE
      FLUSH_FAILURE is used when a flush to an output stream fails.
      static int FORMAT_FAILURE
      FORMAT_FAILURE is used when formatting fails for any reason.
      static int GENERIC_FAILURE
      GENERIC_FAILURE is used for failure that don't fit into one of the other categories.
      static int OPEN_FAILURE
      OPEN_FAILURE is used when an open of an output stream fails.
      static int WRITE_FAILURE
      WRITE_FAILURE is used when a write to an output stream fails.

        

    • Constructor Summary

      Constructors 
      Constructor and Description
      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

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 30/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/util/logging/errormanager.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, ErrorManager

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut