$darkmode
Elektra 0.11.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
org.libelektra.KDBException Class Referenceabstract

Wraps Elektra errors into the corresponding Java exceptions. More...

Inherits Exception.

Inherited by org.libelektra.exception.ConflictingStateException, org.libelektra.exception.PermanentException, and org.libelektra.exception.ValidationException.

Public Member Functions

String getErrorNumber ()
 
String getConfigFile ()
 
String getMountpoint ()
 
String getDebugInformation ()
 
String getModule ()
 
String getReason ()
 
String getMessage ()
 
boolean hasWarnings ()
 If an error occurred it may also has important warnings which caused the error. More...
 
List< WarningEntry > getWarnings ()
 

Static Public Member Functions

static KDBException getMappedException (Key errorKey)
 Extracts warnings and error information and maps it to an appropriate exception. More...
 

Protected Member Functions

 KDBException (Key errorKey)
 

Detailed Description

Wraps Elektra errors into the corresponding Java exceptions.

Constructor & Destructor Documentation

◆ KDBException()

org.libelektra.KDBException.KDBException ( Key  errorKey)
inlineprotected
Parameters
errorKeyKey containing
error/*
and
warnings/*
meta keys

Member Function Documentation

◆ getConfigFile()

String org.libelektra.KDBException.getConfigFile ( )
inline
Returns
The affected configuration file of the error or if not available returns the error key name
Exceptions
IllegalStateExceptionif this error key backing this KDBException has already been released

◆ getDebugInformation()

String org.libelektra.KDBException.getDebugInformation ( )
inline
Returns
Elektra specific debug information in the form of "At: file:line"
Exceptions
IllegalStateExceptionif this error key backing this KDBException has already been released

◆ getErrorNumber()

String org.libelektra.KDBException.getErrorNumber ( )
inline
Returns
Elektra error number read from the error key backing this exception
Exceptions
IllegalStateExceptionif this error key backing this KDBException has already been released

◆ getMappedException()

static KDBException org.libelektra.KDBException.getMappedException ( Key  errorKey)
inlinestatic

Extracts warnings and error information and maps it to an appropriate exception.

Parameters
errorKeyKey containing
error/*
and
warnings/*
meta keys
Returns
KDBException corresponding to the error information
Exceptions
IllegalStateExceptionif this
errorKey
has already been released
IllegalArgumentExceptionif
errorKey
is
null

◆ getMessage()

String org.libelektra.KDBException.getMessage ( )
inline
Returns
The complete error information in a String with config file, mount point and debug information as it would be printed in the terminal
Exceptions
IllegalStateExceptionif this error key backing this KDBException has already been released

◆ getModule()

String org.libelektra.KDBException.getModule ( )
inline
Returns
Module which issued the error
Exceptions
IllegalStateExceptionif this error key backing this KDBException has already been released

◆ getMountpoint()

String org.libelektra.KDBException.getMountpoint ( )
inline
Returns
Mountpoint of the configuration
Exceptions
IllegalStateExceptionif this error key backing this KDBException has already been released

◆ getReason()

String org.libelektra.KDBException.getReason ( )
inline
Returns
Error reason read from the error key backing this exception
Exceptions
IllegalStateExceptionif this error key backing this KDBException has already been released

◆ getWarnings()

List<WarningEntry> org.libelektra.KDBException.getWarnings ( )
inline
Returns
Additional warnings emitted with the error

◆ hasWarnings()

boolean org.libelektra.KDBException.hasWarnings ( )
inline

If an error occurred it may also has important warnings which caused the error.

Returns
True if additional warnings were emitted, false otherwise

The documentation for this class was generated from the following file: