Class ErrorMessage

All Implemented Interfaces:
Detail, Serializable

public class ErrorMessage extends Message
The ErrorMessage class represents a specialized type of Message that is used to log error-level messages in the system. It extends the Message class and automatically sets the level to Level.ERROR.

This class can be used whenever an error message needs to be logged or handled, ensuring it is appropriately flagged as an error-level message. Example usage:

    ErrorMessage errorMsg = new ErrorMessage("An error occurred");
    System.out.println(errorMsg);

Note: The Level enum and the Message class are assumed to be defined elsewhere in the application.

See Also:
  • Constructor Details

    • ErrorMessage

      public ErrorMessage(String message)
      Constructs a new ErrorMessage instance with the specified message content.
      Parameters:
      message - The content of the error message.