public class

BatteryException

extends RuntimeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ com.datalogic.device.battery.BatteryException

Class Overview

This exception is used for installer related errors.

Summary

Constants
int CONTEXT_UNKNOWN This error happens when the registration to receive battery events addBatteryEventListener(BatteryEventListener) is done without having called initBatteryEvents(Context).
int GENERIC_ERROR Generic error, mostly due to a wrong parameter passed to a SDK method.
int NULL_POINTER_ERROR Null pointer error.
int SUCCESS Success constant.
Fields
public int error_number The error number returned by the Installer's system services.
Public Constructors
BatteryException()
Constructs an BatteryException object.
BatteryException(String s)
Constructs an BatteryException object that takes a String parameter containing the reason the exception was thrown.
BatteryException(String s, int number)
Constructs an BatteryException object that takes a String parameter containing the reason the exception was thrown.
BatteryException(int number)
Constructs an BatteryException object that takes a String parameter containing the reason the exception was thrown.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Constants

public static final int CONTEXT_UNKNOWN

Added in revision 21

This error happens when the registration to receive battery events addBatteryEventListener(BatteryEventListener) is done without having called initBatteryEvents(Context).

Constant Value: 2 (0x00000002)

public static final int GENERIC_ERROR

Added in revision 21

Generic error, mostly due to a wrong parameter passed to a SDK method.

Constant Value: 3 (0x00000003)

public static final int NULL_POINTER_ERROR

Added in revision 21

Null pointer error.

Constant Value: 1 (0x00000001)

public static final int SUCCESS

Added in revision 21

Success constant.

Constant Value: 0 (0x00000000)

Fields

public int error_number

Added in revision 21

The error number returned by the Installer's system services.

Public Constructors

public BatteryException ()

Added in revision 21

Constructs an BatteryException object.

public BatteryException (String s)

Added in revision 21

Constructs an BatteryException object that takes a String parameter containing the reason the exception was thrown.

Parameters
s String indicating why the exception occurred.

public BatteryException (String s, int number)

Added in revision 21

Constructs an BatteryException object that takes a String parameter containing the reason the exception was thrown.

Parameters
s String indicating why the exception occurred.
number int indicating the error code number.

public BatteryException (int number)

Added in revision 21

Constructs an BatteryException object that takes a String parameter containing the reason the exception was thrown.

Parameters
number int indicating the error code number.