com.xerox.bantam
Class StorageException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.xerox.bantam.StorageException
All Implemented Interfaces:
Serializable

public class StorageException
extends Exception

Exception thrown by methods in the Bantam interfaces. This single exception is used for a wide range of problems. The constants defined here are message prefixes indicating particular types of problems so that an application can distinguish some cases.

Version:
$Revision: 1.13 $, $Date: 2000/08/11 07:16:21 $
Author:
Keith Edwards
See Also:
Serialized Form

Field Summary
static int BAD_CLASSNAME
          User supplied a class name (in a schema) that could not be found.
static int BAD_DOCUMENT
          The Document (or document identifier) passed into Bantam as an argument could not be found.
static int INVALID_ARGUMENT
          An invalid argument was passed into the Bantam interface.
static int INVALID_FIELD_DESCRIPTOR
          Part of a FieldDescriptor does not make sense.
static int INVALID_SET
          A violation of property-setting semantics occurred.
static int NOT_PERMITTED
          The underlying storage mechanism does not allow the requested operation.
static int SCHEMA_VIOLATION
          Attempt to put an item in a field which violates the schema's type rules.
static int UNDERLYING_EXCEPTION
          The underlying Storage mechanism failed.
 
Constructor Summary
StorageException(Exception ex)
          Constructor for "re"-throwing exceptions encountered inside the Bantam implementation.
StorageException(int _tag, String _message)
          Basic constructor.
StorageException(String message)
          Basic constructor for internal errors.
StorageException(String prefix, Exception ex)
          Constructor for "re"-throwing exceptions encountered inside the Bantam implementation.
 
Method Summary
static String getStackTrace()
          Internal helper function to support building-up of exception strings.
static String getStackTrace(Exception ex)
          Internal helper function to support "re"-throwing of exceptions.
 int getTag()
           
 String getTagString()
           
static void main(String[] argv)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BAD_CLASSNAME

public static final int BAD_CLASSNAME
User supplied a class name (in a schema) that could not be found.

SCHEMA_VIOLATION

public static final int SCHEMA_VIOLATION
Attempt to put an item in a field which violates the schema's type rules.

UNDERLYING_EXCEPTION

public static final int UNDERLYING_EXCEPTION
The underlying Storage mechanism failed.

NOT_PERMITTED

public static final int NOT_PERMITTED
The underlying storage mechanism does not allow the requested operation.

INVALID_FIELD_DESCRIPTOR

public static final int INVALID_FIELD_DESCRIPTOR
Part of a FieldDescriptor does not make sense.

BAD_DOCUMENT

public static final int BAD_DOCUMENT
The Document (or document identifier) passed into Bantam as an argument could not be found.

INVALID_SET

public static final int INVALID_SET
A violation of property-setting semantics occurred.

INVALID_ARGUMENT

public static final int INVALID_ARGUMENT
An invalid argument was passed into the Bantam interface.
Constructor Detail

StorageException

public StorageException(int _tag,
                        String _message)
Basic constructor.
Parameters:
_tag - One of the tags documented in this class.
detail - An associated free-form message.

StorageException

public StorageException(String message)
Basic constructor for internal errors. This is deprecated for API-level use as one should, ideally, be using one of the variations that provides more specific information.

StorageException

public StorageException(Exception ex)
Constructor for "re"-throwing exceptions encountered inside the Bantam implementation. This should not be used to report problems within the Bantam layer itself, e.g., schema violations.
Parameters:
ex - The exception to "re"-throw.

StorageException

public StorageException(String prefix,
                        Exception ex)
Constructor for "re"-throwing exceptions encountered inside the Bantam implementation. This should not be used to report problems within the Bantam layer itself, e.g., schema violations.
Parameters:
ex - The exception to "re"-throw.
Method Detail

getTag

public int getTag()

getTagString

public String getTagString()

getStackTrace

public static String getStackTrace(Exception ex)
Internal helper function to support "re"-throwing of exceptions.

getStackTrace

public static String getStackTrace()
Internal helper function to support building-up of exception strings.

main

public static void main(String[] argv)

Project Harland