Class LocationException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FileException

public class LocationException extends BaseException
This class implements an exception that relates to a location.
See Also:
  • Constructor Details

    • LocationException

      public LocationException(String message, String location, Object... replacements)
      Creates a new instance of an exception with the specified detail message and location.
      Parameters:
      message - the detail message of the exception.
      location - the location with which the exception will be associated, which may be null.
      replacements - the items whose string representations will replace placeholders in message.
    • LocationException

      public LocationException(String message, Throwable cause, String location, Object... replacements)
      Creates a new instance of an exception with the specified detail message, cause and location.
      Parameters:
      message - the detail message of the exception.
      cause - the cause of the exception, which may be null.
      location - the location with which the exception will be associated, which may be null.
      replacements - the items whose string representations will replace placeholders in message.
    • LocationException

      public LocationException(BaseException exception, String location, Object... replacements)
      Creates a new instance of an exception from the detail message and cause of the specified exception and the specified location.
      Parameters:
      exception - the exception that will provide the detail message and underlying cause.
      location - the location with which the exception will be associated, which may be null.
      replacements - the items whose string representations will replace placeholders in message.
  • Method Details

    • createMessage

      public static String createMessage(String message, String location, Object... replacements)
      Creates a composite message from the specified components, and returns the result.
      Parameters:
      message - the base message.
      location - the location that will be prefixed to message, which may be null.
      replacements - the items whose string representations will replace placeholders in message.
      Returns:
      the composite message that was created from message, location and replacements.