Elektra  0.9.4
Public Member Functions | List of all members
org.libelektra.exception.KDBException Class Referenceabstract

This exception 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

 KDBException (final Key k)
 KDBException which holds the errorKey. More...
 
Key getErrorKey ()
 Gets the errorKey from Elektra. More...
 
String getErrorNumber ()
 Gets the errorNumber from Elektra. More...
 
String getConfigFile ()
 Returns the affected configuration file of the error. More...
 
String getMountpoint ()
 Returns the mountpoint of the configuration. More...
 
String getDebugInformation ()
 Prints Elektra specific debug information in the form of "At: file:line". More...
 
String getModule ()
 Returns the module which has thrown the error. More...
 
String getLocalizedMessage ()
 
String getReason ()
 Returns the error reason which is written to the error/reason metakey of the errorkey. More...
 
String getMessage ()
 getMessage() returns the thrown Elektra error in the same format as it would be printed in the terminal More...
 
boolean hasWarnings ()
 If an error occurred it may also has important warnings which caused the error. More...
 
Collection< WarningEntry > getWarnings ()
 Returns the warnings collection. More...
 

Detailed Description

This exception wraps Elektra errors into the corresponding Java Exceptions.

Constructor & Destructor Documentation

◆ KDBException()

org.libelektra.exception.KDBException.KDBException ( final Key  k)
inline

KDBException which holds the errorKey.

Parameters
kThe errorKey

Member Function Documentation

◆ getConfigFile()

String org.libelektra.exception.KDBException.getConfigFile ( )
inline

Returns the affected configuration file of the error.

It empty returns the parents Key name

Returns
either the configuration file or if empty the parent key name

◆ getDebugInformation()

String org.libelektra.exception.KDBException.getDebugInformation ( )
inline

Prints Elektra specific debug information in the form of "At: file:line".

Returns
Elektra specific debug information in the form of "At: file:line"

◆ getErrorKey()

Key org.libelektra.exception.KDBException.getErrorKey ( )
inline

Gets the errorKey from Elektra.

Returns
ErrorKey from Elektra

◆ getErrorNumber()

String org.libelektra.exception.KDBException.getErrorNumber ( )
inline

Gets the errorNumber from Elektra.

Returns
ErrorNumber from Elektra

◆ getLocalizedMessage()

String org.libelektra.exception.KDBException.getLocalizedMessage ( )
inline
See also
this.getMessage()

◆ getMessage()

String org.libelektra.exception.KDBException.getMessage ( )
inline

getMessage() returns the thrown Elektra error in the same format as it would be printed in the terminal

Returns
The complete error information in a String with configfile, moutpoint and debuginformation

◆ getModule()

String org.libelektra.exception.KDBException.getModule ( )
inline

Returns the module which has thrown the error.

Returns
the module which has thrown the error

◆ getMountpoint()

String org.libelektra.exception.KDBException.getMountpoint ( )
inline

Returns the mountpoint of the configuration.

Returns
the mountpoint of the configuration

◆ getReason()

String org.libelektra.exception.KDBException.getReason ( )
inline

Returns the error reason which is written to the error/reason metakey of the errorkey.

Returns
The reason for the error

◆ getWarnings()

Collection<WarningEntry> org.libelektra.exception.KDBException.getWarnings ( )
inline

Returns the warnings collection.

Returns
the warnings collection

◆ hasWarnings()

boolean org.libelektra.exception.KDBException.hasWarnings ( )
inline

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

This method checks if they are available

Returns
true if additional warnings were emitted

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