Skip to content

Package io.github.qishr.cascara.common.diagnostic

Class AbstractLocalizableException

java.lang.Object
        java.lang.Throwable
                java.lang.Exception
                        io.github.qishr.cascara.common.diagnostic.AbstractLocalizableException

All Implemented Interfaces:
    LocalizableException

Direct Known Subtypes:
    JsonPointerException


public class AbstractLocalizableException
extends Exception

Constructor Summary

Constructor Description
AbstractLocalizableException(DiagnosticCode code, Object[] details)
AbstractLocalizableException(Throwable cause, DiagnosticCode code, Object[] details)

Method Summary

Modifier and Type Method Description
public static DiagnosticLocalizer getLocalizer()
public static void setLocalizer(DiagnosticLocalizer customLocalizer)
public DiagnosticCode getCode() Returns a diagnostic error code for the error message.
public Object[] getDetails() Returns the details, if any, to be used in formatting the error message.
public String getLocalizedMessage() Returns a localized, formatted error message.
public String getMessage() Returns a localized, formatted error message.

Method Details

getLocalizer

public static DiagnosticLocalizer getLocalizer()


setLocalizer

public static void setLocalizer(DiagnosticLocalizer customLocalizer)


getCode

public DiagnosticCode getCode()

Returns a diagnostic error code for the error message.

Specified By:

LocalizableException


getDetails

public Object[] getDetails()

Returns the details, if any, to be used in formatting the error message.

Specified By:

LocalizableException


getLocalizedMessage

public String getLocalizedMessage()

Returns a localized, formatted error message.

Specified By:

LocalizableException

Overrides:

Exception


getMessage

public String getMessage()

Returns a localized, formatted error message.

Specified By:

LocalizableException

Overrides:

Exception