Class Message

java.lang.Object
java.lang.Throwable
java.lang.Exception
br.net.dd.netherwingcore.common.logging.Message
All Implemented Interfaces:
Detail, Serializable
Direct Known Subclasses:
DebugMessage, ErrorMessage, FatalErrorMessage, InformationMessage, TraceMessage, WarningMessage

public class Message extends Exception implements Detail
Represents a custom exception that can encapsulate additional details, including a logging level. This class extends Exception and implements the Detail interface. It can be used to associate specific log levels with exception messages.
See Also:
  • Constructor Details

    • Message

      public Message(String message)
      Constructs a new Message exception with the specified detail message.
      Parameters:
      message - The detail message, which is saved for later retrieval by the Throwable.getMessage() method.
  • Method Details

    • getLevel

      public Level getLevel()
      Retrieves the log level associated with this exception.
      Returns:
      The logging level defined in this exception. May be null if it has not been set.