VariableErrorHandlingDescriptor (install4j API)
Description: declaration: package: com.install4j.api.beans, class: VariableErrorHandlingDescriptor

# Class VariableErrorHandlingDescriptor

java.lang.Object
com.install4j.api.beans.VariableErrorHandlingDescriptor

public class VariableErrorHandlingDescriptor extends Object
Specifies the error handling for variable replacements. Instances of this class are passed to some of the `replaceVariables(...)` methods in `AbstractBean`.

Each variable type (installer variable, I18N message, compiler and form variable) has its own error handling.

Note: compiler variables in the project are replaced at compile time. Compiler variables in external files, such as a custom localization file, are not replaced at compile time.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final VariableErrorHandlingDescriptor`
  `ALWAYS_ERROR_MESSAGE`
  Always replace undefined variables with an error message.
  `static final VariableErrorHandlingDescriptor`
  `ALWAYS_EXCEPTION`
  Always throw exceptions for undefined variables.
  `static final VariableErrorHandlingDescriptor`
  `ALWAYS_IGNORE`
  Ignore all undefined variables.
  `static final VariableErrorHandlingDescriptor`
  `DEFAULT`
  The default error handling.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VariableErrorHandlingDescriptor(VariableErrorHandling installerVariables, VariableErrorHandling i18nKeys, VariableErrorHandling compilerVariables)`
  Construct a custom variable error handling Like `VariableErrorHandlingDescriptor(VariableErrorHandling, VariableErrorHandling, VariableErrorHandling, VariableErrorHandling)` with formVariables set to `VariableErrorHandling.ERROR_MESSAGE`.
  `VariableErrorHandlingDescriptor(VariableErrorHandling installerVariables, VariableErrorHandling i18nKeys, VariableErrorHandling compilerVariables, VariableErrorHandling formVariables)`
  Construct a custom variable error handling

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VariableErrorHandling`
  `getCompilerVariables()`
  Returns the error handling for compiler variables.
  `VariableErrorHandling`
  `getFormVariables()`
  Returns the error handling for form variables.
  `VariableErrorHandling`
  `getI18nKeys()`
  Returns the error handling for localization keys.
  `VariableErrorHandling`
  `getInstallerVariables()`
  Returns the error handling for installer variables.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### DEFAULT

    public static final VariableErrorHandlingDescriptor DEFAULT
    The default error handling. Throws an exception for undefined installer variables and replaces undefined localization keys, compiler variables and form variables with an error message.

  - ### ALWAYS_IGNORE

    public static final VariableErrorHandlingDescriptor ALWAYS_IGNORE
    Ignore all undefined variables.

  - ### ALWAYS_ERROR_MESSAGE

    public static final VariableErrorHandlingDescriptor ALWAYS_ERROR_MESSAGE
    Always replace undefined variables with an error message.

  - ### ALWAYS_EXCEPTION

    public static final VariableErrorHandlingDescriptor ALWAYS_EXCEPTION
    Always throw exceptions for undefined variables.

- ## Constructor Details

  - ### VariableErrorHandlingDescriptor

    public VariableErrorHandlingDescriptor(VariableErrorHandling installerVariables, VariableErrorHandling i18nKeys, VariableErrorHandling compilerVariables)
    Construct a custom variable error handling Like `VariableErrorHandlingDescriptor(VariableErrorHandling, VariableErrorHandling, VariableErrorHandling, VariableErrorHandling)` with formVariables set to `VariableErrorHandling.ERROR_MESSAGE`.

  - ### VariableErrorHandlingDescriptor

    public VariableErrorHandlingDescriptor(VariableErrorHandling installerVariables, VariableErrorHandling i18nKeys, VariableErrorHandling compilerVariables, VariableErrorHandling formVariables)
    Construct a custom variable error handling
    Parameters:
      `installerVariables` - error handling for installer variables
      `i18nKeys` - error handling for localization keys
      `compilerVariables` - error handling for compiler variables
      `formVariables` - error handling for form variables

- ## Method Details

  - ### getInstallerVariables

    public VariableErrorHandling getInstallerVariables()
    Returns the error handling for installer variables.
    Returns:
      the error handling

  - ### getI18nKeys

    public VariableErrorHandling getI18nKeys()
    Returns the error handling for localization keys.
    Returns:
      the error handling

  - ### getCompilerVariables

    public VariableErrorHandling getCompilerVariables()
    Returns the error handling for compiler variables.
    Returns:
      the error handling

  - ### getFormVariables

    public VariableErrorHandling getFormVariables()
    Returns the error handling for form variables.
    Returns:
      the error handling