com.sap.ip.me.api.pios
Class PIOSException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.sap.ip.me.api.services.MEException
              extended bycom.sap.ip.me.api.pios.PIOSException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ConfigurationException, InvalidSymbologyException, LibraryNotLoadedException, PrinterException, RfidException, ScannerException, TimeOutException, UnsupportedException

public class PIOSException
extends MEException

Base class for all PIOS exceptions. Exceptions thrown by the PIOS layer will be based on this exception.

The constructor accepts a detail message, an error code or a Throwable object identifying the cause of the error.

Since:
MI 2.5
Author:
Abaco
See Also:
Serialized Form

Field Summary
static int ALREADY_CREATED
          Constant that indicates that a native object has already been created.
static int ALREADY_OPENED
          Constant that indicates that the connection is already open.
static int CONFIGURATION_ERROR
          Constant that indicates that there is a configuration error.
static int GENERIC_ERROR
          Constant that indicates a generic error.
static int INVALID_OBJECT
          Constant that indicates that a native invalid object has been detected.
static int INVALID_PARAMETER
          Constant that indicates that an invalid parameter has been detected.
static int INVALID_SYMBOLOGY
          Constant that indicates that the symbology or an option of the symbology is invalid.
static int LIBRARY_NOT_LOADED
          Constant that indicates that the library could not been loaded.
static int NOT_CREATED
          Constant that indicates an invalid access to an object because a native object has not been created yet.
static int NOT_OPENED
          Constant that indicates an invalid access to an object because the connection has not been open.
static int OUT_OF_MEMORY
          Constant that indicates an out of memory error.
static int SPECIFIC_PRINTER_ERROR
          Constant reserved for specific peripherals.
static int SPECIFIC_RFID_ERROR
          Constant reserved for specific peripherals.
static int SPECIFIC_SCANNER_ERROR
          Constant reserved for specific peripherals.
static int TIMEOUT
          Constant that indicates that there was a timeout performing an operation.
static int UNKNOWN_ERROR
          Constant that indicates an unknown error.
static int UNSPECIFIED_ERROR
          Constant that indicates that no error has been specified.
static int UNSUPPORTED
          Constant that indicates that the called method is not supported by the driver.
 
Constructor Summary
PIOSException()
          Creates a new PIOSException with no detailed message.
PIOSException(int errorCode)
          Creates a new PIOSException with just an error code.
PIOSException(int errorCode, java.lang.String message)
          Creates a new PIOSException with the specified detail message and the specified error code.
PIOSException(int errorCode, java.lang.Throwable cause)
          Creates a new exception with the a detail message generated by calling getException and with the specifed error code.
PIOSException(java.lang.String message)
          Creates a new PIOSException with the specified detail message.
PIOSException(java.lang.Throwable cause)
          Creates a new exception with the a detail message generated by calling getException.
 
Method Summary
 int getErrorCode()
          Returns the error number/code associated with the exception.
static java.lang.String getException(java.lang.Throwable cause)
          Returns the specified throwable object stack trace as an string.
 
Methods inherited from class com.sap.ip.me.api.services.MEException
getNestedException, getReason, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNSPECIFIED_ERROR

public static final int UNSPECIFIED_ERROR
Constant that indicates that no error has been specified.

See Also:
Constant Field Values

UNKNOWN_ERROR

public static final int UNKNOWN_ERROR
Constant that indicates an unknown error.

See Also:
Constant Field Values

GENERIC_ERROR

public static final int GENERIC_ERROR
Constant that indicates a generic error.

See Also:
Constant Field Values

INVALID_OBJECT

public static final int INVALID_OBJECT
Constant that indicates that a native invalid object has been detected.

See Also:
Constant Field Values

ALREADY_CREATED

public static final int ALREADY_CREATED
Constant that indicates that a native object has already been created. This is typically caused by problems on the PIOS layer.

See Also:
Constant Field Values

INVALID_PARAMETER

public static final int INVALID_PARAMETER
Constant that indicates that an invalid parameter has been detected.

See Also:
Constant Field Values

NOT_CREATED

public static final int NOT_CREATED
Constant that indicates an invalid access to an object because a native object has not been created yet. This is typically caused by problems on the PIOS layer.

See Also:
Constant Field Values

NOT_OPENED

public static final int NOT_OPENED
Constant that indicates an invalid access to an object because the connection has not been open.

See Also:
Constant Field Values

ALREADY_OPENED

public static final int ALREADY_OPENED
Constant that indicates that the connection is already open.

See Also:
Constant Field Values

UNSUPPORTED

public static final int UNSUPPORTED
Constant that indicates that the called method is not supported by the driver. Used by the UnsupportedException.

See Also:
UnsupportedException, Constant Field Values

LIBRARY_NOT_LOADED

public static final int LIBRARY_NOT_LOADED
Constant that indicates that the library could not been loaded. Used by the LibraryNotLoadedException

See Also:
LibraryNotLoadedException, Constant Field Values

TIMEOUT

public static final int TIMEOUT
Constant that indicates that there was a timeout performing an operation. Used by the TimeOutException

See Also:
TimeOutException, Constant Field Values

OUT_OF_MEMORY

public static final int OUT_OF_MEMORY
Constant that indicates an out of memory error.

See Also:
Constant Field Values

CONFIGURATION_ERROR

public static final int CONFIGURATION_ERROR
Constant that indicates that there is a configuration error. Used by the ConfigurationException

See Also:
ConfigurationException, Constant Field Values

INVALID_SYMBOLOGY

public static final int INVALID_SYMBOLOGY
Constant that indicates that the symbology or an option of the symbology is invalid. Used by the InvalidSymbologyException

See Also:
InvalidSymbologyException, Constant Field Values

SPECIFIC_PRINTER_ERROR

public static final int SPECIFIC_PRINTER_ERROR
Constant reserved for specific peripherals. Printers will have their own error code greater than SPECIFIC_PRINTER_ERROR.

See Also:
Constant Field Values

SPECIFIC_SCANNER_ERROR

public static final int SPECIFIC_SCANNER_ERROR
Constant reserved for specific peripherals. Scanners will have their own error code greater than SPECIFIC_PRINTER_ERROR.

See Also:
Constant Field Values

SPECIFIC_RFID_ERROR

public static final int SPECIFIC_RFID_ERROR
Constant reserved for specific peripherals. Rfid will have their own error code greater than SPECIFIC_RFID_ERROR.

See Also:
Constant Field Values
Constructor Detail

PIOSException

public PIOSException()
Creates a new PIOSException with no detailed message.


PIOSException

public PIOSException(int errorCode)
Creates a new PIOSException with just an error code.

Parameters:
errorCode - the error number

PIOSException

public PIOSException(java.lang.String message)
Creates a new PIOSException with the specified detail message.

Parameters:
message - the detail message.

PIOSException

public PIOSException(int errorCode,
                     java.lang.String message)
Creates a new PIOSException with the specified detail message and the specified error code.

Parameters:
errorCode - the error number
message - the detail message.

PIOSException

public PIOSException(java.lang.Throwable cause)
Creates a new exception with the a detail message generated by calling getException.

Parameters:
cause - the exception cause

PIOSException

public PIOSException(int errorCode,
                     java.lang.Throwable cause)
Creates a new exception with the a detail message generated by calling getException and with the specifed error code.

Parameters:
errorCode - the error number
cause - the exception cause
Method Detail

getException

public static java.lang.String getException(java.lang.Throwable cause)
Returns the specified throwable object stack trace as an string.

Parameters:
cause - the exception cause
Returns:
A string with the cause exception message including the stack trace.

getErrorCode

public int getErrorCode()
Returns the error number/code associated with the exception.

Returns:
The error code


Copyright © 2005 SAP AG. All Rights Reserved.