# Class CLNException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.io7m.calino.api.CLNException

All Implemented Interfaces:
  `com.io7m.seltzer.api.SStructuredErrorExceptionType<String>, com.io7m.seltzer.api.SStructuredErrorType<String>, Serializable`

public final class CLNException extends Exception implements com.io7m.seltzer.api.SStructuredErrorExceptionType<String>
The base type of exceptions raised by the package.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CLNException(String message, Throwable cause, Map<String,String> inAttributes, String inErrorCode, Optional<String> inRemediatingAction)`
  Construct an exception.
  `CLNException(String message, Map<String,String> inAttributes, String inErrorCode, Optional<String> inRemediatingAction)`
  Construct an exception.
  `CLNException(Throwable cause, Map<String,String> inAttributes, String inErrorCode, Optional<String> inRemediatingAction)`
  Construct an exception.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<String,String>`
  `attributes()`
  `String`
  `errorCode()`
  `Optional<Throwable>`
  `exception()`
  `Optional<String>`
  `remediatingAction()`
  `static CLNException`
  `wrap(Throwable x)`
  Wrap the given exception.

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

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

  ### Methods inherited from interface com.io7m.seltzer.api.SStructuredErrorExceptionType

  `getMessage, message`

- ## Constructor Details

  - ### CLNException

    public CLNException(String message, Map<String,String> inAttributes, String inErrorCode, Optional<String> inRemediatingAction)
    Construct an exception.
    Parameters:
      `message` - The message
      `inAttributes` - The attributes
      `inErrorCode` - The error code
      `inRemediatingAction` - The remediating action

  - ### CLNException

    public CLNException(String message, Throwable cause, Map<String,String> inAttributes, String inErrorCode, Optional<String> inRemediatingAction)
    Construct an exception.
    Parameters:
      `message` - The message
      `cause` - The cause
      `inAttributes` - The attributes
      `inErrorCode` - The error code
      `inRemediatingAction` - The remediating action

  - ### CLNException

    public CLNException(Throwable cause, Map<String,String> inAttributes, String inErrorCode, Optional<String> inRemediatingAction)
    Construct an exception.
    Parameters:
      `cause` - The cause
      `inAttributes` - The attributes
      `inErrorCode` - The error code
      `inRemediatingAction` - The remediating action

- ## Method Details

  - ### wrap

    public static CLNException wrap(Throwable x)
    Wrap the given exception. The function takes into account whether the incoming exception is a structured error, and the existing exception might be treated as the cause of the wrapped exception.
    Parameters:
      `x` - The exception
    Returns:
      The wrapped result

  - ### attributes

    public Map<String,String> attributes()
    Specified by:
      `attributes` in interface `com.io7m.seltzer.api.SStructuredErrorType<String>`

  - ### errorCode

    public String errorCode()
    Specified by:
      `errorCode` in interface `com.io7m.seltzer.api.SStructuredErrorType<String>`

  - ### remediatingAction

    public Optional<String> remediatingAction()
    Specified by:
      `remediatingAction` in interface `com.io7m.seltzer.api.SStructuredErrorType<String>`

  - ### exception

    public Optional<Throwable> exception()
    Specified by:
      `exception` in interface `com.io7m.seltzer.api.SStructuredErrorType<String>`