org.opengis.cite.ogcapitiles10

## Class ErrorMessage

- java.lang.Object
- - org.opengis.cite.ogcapitiles10.ErrorMessage

-     public class ErrorMessage
      extends Object

  Utility class for retrieving and formatting localized error messages that describe failed assertions.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ErrorMessage()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `format(String msgKey, Object... args)` Produces a formatted error message using the supplied substitution arguments and the current locale.
    `static String` | `get(String msgKey)` Retrieves a simple message according to the current locale.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ErrorMessage

          public ErrorMessage()

  - ### Method Detail

    - #### format

          public static String format(String msgKey,
                                      Object... args)

      Produces a formatted error message using the supplied substitution arguments and the current locale. The arguments should reflect the order of the placeholders in the message template.
      Parameters:
        `msgKey` - The key identifying the message template; it should be a member of `ErrorMessageKeys`.
        `args` - An array of arguments to be formatted and substituted in the content of the message.
      Returns:
        A String containing the message content. If no message is found for the given key, a `MissingResourceException` is thrown.

    - #### get

          public static String get(String msgKey)

      Retrieves a simple message according to the current locale.
      Parameters:
        `msgKey` - The key identifying the message; it should be a member of `ErrorMessageKeys`.
      Returns:
        A String containing the message content. If no message is found for the given key, a `MissingResourceException` is thrown.

Copyright © 2024 Open Geospatial Consortium. All rights reserved.