Packages

  • package root

    This is the API documentation for Ciris: lightweight, extensible, and validated configuration loading in Scala.
    The documentation is kept up-to-date with new releases, currently documenting release v0.12.0 on Scala 2.12.
    Please note that the documentation targets the JVM, and there may be differences on Scala.js and Scala Native.

    This is the API documentation for Ciris: lightweight, extensible, and validated configuration loading in Scala.
    The documentation is kept up-to-date with new releases, currently documenting release v0.12.0 on Scala 2.12.
    Please note that the documentation targets the JVM, and there may be differences on Scala.js and Scala Native.

    Ciris is divided into the following set of modules.

    • The cats module integrates with cats for type classes and type class instances.
    • The cats-effect module integrates with cats-effect for type classes for effect types.
    • The core module provides basic functionality and support for standard library types.
    • The enumeratum module integrates with enumeratum to be able to read enumerations.
    • The generic module uses shapeless to be able to read products and coproducts.
    • The refined module integrates with refined to be able to read refinement types.
    • The spire module integrates with spire to be able to read more number types.
    • The squants module integrates with squants to read values with unit of measure.

    If you're looking for usage instructions, please refer to the usage guide.

    Definition Classes
    root
  • package ciris

    The main namespace of Ciris is ciris, and the easiest way to get started is to bring it into scope with an import.
    If you are looking for a getting started guide, with examples and explanations, please refer to the usage guide.

    The main namespace of Ciris is ciris, and the easiest way to get started is to bring it into scope with an import.
    If you are looking for a getting started guide, with examples and explanations, please refer to the usage guide.

    Definition Classes
    root
  • package api
    Definition Classes
    ciris
  • package cats

    Module providing an integration with cats.

    Module providing an integration with cats.

    Definition Classes
    ciris
  • package decoders
    Definition Classes
    ciris
  • package enumeratum

    Module providing an integration with enumeratum.

    Module providing an integration with enumeratum.

    Definition Classes
    ciris
  • package generic

    Module using shapeless for generic derivation of ConfigDecoders.

    Module using shapeless for generic derivation of ConfigDecoders.

    Definition Classes
    ciris
  • package refined

    Module providing an integration with refined.

    Module providing an integration with refined.

    Definition Classes
    ciris
  • package spire

    Module providing an integration with spire.

    Module providing an integration with spire.

    Definition Classes
    ciris
  • package squants

    Module providing an integration with squants.

    Module providing an integration with squants.

    Definition Classes
    ciris
  • ConfigDecoder
  • ConfigEntry
  • ConfigError
  • ConfigErrors
  • ConfigException
  • ConfigKeyType
  • ConfigResult
  • ConfigSource
  • ConfigValue
  • Secret

sealed abstract class ConfigError extends AnyRef

ConfigError represents one or more errors that occurred while reading or decoding a single ConfigEntry configuration entry value. An error is basically a String message, and can be created from one by using ConfigError#apply in the companion object.

scala> val error = ConfigError("error")
error: ConfigError = ConfigError(error)

scala> error.message
res0: String = error

ConfigErrors can be combined into a single ConfigError using the combine method. This is useful when there was more than one error when reading or decoding the configuration value.

scala> error combine ConfigError("error2")
res1: ConfigError = Combined(ConfigError(error), ConfigError(error2))

There is also a convenience method append for creating ConfigErrors.

scala> error append ConfigError("error2")
res2: ConfigErrors = ConfigErrors(ConfigError(error), ConfigError(error2))

The companion object contains methods for creating the most common ConfigErrors, like:

- ConfigError#missingKey for when there is no value for a specified key,
- ConfigError#readException for when an error occurred while reading a key, and
- ConfigError#wrongType for when the value couldn't be converted to the expected type.

Source
ConfigError.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfigError
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def message: String

    The String error message for this ConfigError.

    The String error message for this ConfigError.

    returns

    the error message

    Example:
    1. scala> ConfigError("error").message
      res0: String = error
  2. abstract def redactSensitive: ConfigError

    Returns a new ConfigError with any potentially sensitive details, like secret configuration values, redacted from the error message.

    Returns a new ConfigError with any potentially sensitive details, like secret configuration values, redacted from the error message.

    returns

    a new ConfigError

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def append(that: ConfigError): ConfigErrors

    Appends that ConfigError to this ConfigError to create a new ConfigErrors instance.

    Appends that ConfigError to this ConfigError to create a new ConfigErrors instance. This is useful for when reading or decoding more than one value and errors need to be accumulated.

    ConfigErrors are appended in order so that this ConfigError is before that ConfigError in the resulting ConfigErrors.

    that

    the ConfigError to append

    returns

    a new ConfigErrors instance containing this ConfigError followed by that ConfigError

    Example:
    1. scala> ConfigError("error1") append ConfigError("error2")
      res0: ConfigErrors = ConfigErrors(ConfigError(error1), ConfigError(error2))
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def combine(that: ConfigError): ConfigError

    Combines this ConfigError with that ConfigError to create a new ConfigError with both error messages.

    Combines this ConfigError with that ConfigError to create a new ConfigError with both error messages. This is useful when there is more than one error when reading or decoding a single value.

    ConfigErrors are combined in order, so that the message of this ConfigError is before the message of that ConfigError.

    that

    the ConfigError to combine with this ConfigError

    returns

    a new ConfigError with both errors' messages

    Example:
    1. scala> ConfigError("error1") combine ConfigError("error2")
      res0: ConfigError = Combined(ConfigError(error1), ConfigError(error2))
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def isMissingKey: Boolean

    Checks whether this error occurred because the key for the value was missing from the ConfigSource.

    Checks whether this error occurred because the key for the value was missing from the ConfigSource. If this error is in fact a combination of different errors, checks whether all of them are because of the keys were missing.

    returns

    true if the key was missing from the source; false otherwise

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped