com.sage.accpac.sm
Class ViewException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sage.accpac.sm.ViewException
All Implemented Interfaces:
java.io.Serializable

@NotThreadSafe
public class ViewException
extends java.lang.RuntimeException

The exception that is thrown when a call to any methods of the View (or ViewFields,...) fails.

See Also:
Serialized Form

Field Summary
static int ApplicationDefinedBase
          This is the lowest value for an application-defined error; consult the application's documentation for values between this and ApplicationDefinedEnd.
static int ApplicationDefinedEnd
          This is the highest value for an application-defined error; consult the application's documentation for values between this and ApplicationDefinedBase.
static int ComposeFailed
          A view failed to perform composition.
static int DatabaseDictionary
          The database dictionary is inconsistent.
static int DatabaseLimit
          The database resources were exceeded.
static int DatabaseOther
          There was an unspecified database error.
static int DatabaseParameter
          There was an invalid database link, table handle or other parameters when calling database apis.
static int FieldDisabled
          The call attempted to access a disabled field.
static int FieldID
          The supplied field ID is not a valid field ID in the view.
static int FieldInvalid
          Field validation failed.
static int FieldNumber
          The supplied field number is not a valid field number in the view.
static int FieldReadonly
          The field is read-only.
static int FilterOther
          An unspecified error occurred when parsing the filter string.
static int FilterSyntax
          The filter string contains invalid syntax.
static int General
          A general error occurred.
static int KeyChanged
          There was an attempt to change alternate key field values but the data dictionary does not permit them to be modified.
static int KeyInvalid
          Validation of the record key failed.
static int KeyNumber
          The supplied key number is invalid.
static int LoadFailed
          A view failed to load.
static int MemoryBufferLimit
          The supplied memory buffer does not meet the required size of the requested operation.
static int MemoryNoMore
          The process is out of memory.
static int NonViewError
          The call failed but it was not caused by a view error.
static int OpenFailed
          A view failed to open.
static int OperationCancelled
          A View operation was cancelled either by the user or the caller.
static int PermissionNone
          Permission was denied.
static int RecordConflict
          The record has been modified by another user.
static int RecordDuplicate
          A record with the same key values already exists.
static int RecordExists
          The record already exists.
static int RecordInvalid
          The record contains some invalid values.
static int RecordLocked
          The record has been locked by another process.
static int RecordNoMoreData
          No more records can be fetched.
static int RecordNotFound
          The record specified does not exist in the view.
static int RecordNotLocked
          The record is not locked and the requested task requires that the record be locked.
static int RevisionProtocol
          There was an invalid state or call to revision APIs.
static int RotoEntryFailed
          The caller has requested an operation that is not implemented by this view.
static int RPCFailed
          A remote procedure call failed
static int Success
          The view call succeeded.
static int TableExists
          The specified table already exists.
static int TableNotFound
          The specified table could not be found.
static int TransactionNone
          A transaction is required to perform the operation.
static int TransactionOpen
          A transaction is open and the requested operation requires that no transactions be open.
static int Warning
          The view call succeeded with a warning; consult the Program's Errors collection.
static int WarningApplicationDefinedBase
          This is the lowest value for an application-defined warning; consult the application's documentation for values between this and WarningApplicationDefinedEnd.
static int WarningApplicationDefinedEnd
          This is the highest value for an application-defined warning; consult the application's documentation for values between this and WarningApplicationDefinedEnd.
static int WarningGeneral
          The view call succeeded with a warning; consult the Program's Errors collection.
 
Constructor Summary
ViewException()
          constructs an instance of ViewException with a return code of success
ViewException(int viewReturnCode)
          constructs an instance of the ViewException class with the specified return code
ViewException(int viewReturnCode, java.lang.String message)
          constructs an instance of the ViewException class with the specified return code and message
 
Method Summary
 java.lang.String getMessage()
          This implementation currently returns null.
 int getReason()
          returns the error code that caused the exception to be thrown.
static boolean isError(int value)
          Does the specified value denote a view error? Note that warnings do not count as errors; if the value does not denote an error it may denote a warning.
static boolean isWarning(int value)
          Does the specified value denote a view warning?
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Success

public static final int Success
The view call succeeded.

See Also:
Constant Field Values

WarningGeneral

public static final int WarningGeneral
The view call succeeded with a warning; consult the Program's Errors collection.

See Also:
Constant Field Values

Warning

public static final int Warning
The view call succeeded with a warning; consult the Program's Errors collection.

See Also:
Constant Field Values

WarningApplicationDefinedBase

public static final int WarningApplicationDefinedBase
This is the lowest value for an application-defined warning; consult the application's documentation for values between this and WarningApplicationDefinedEnd.

See Also:
Constant Field Values

WarningApplicationDefinedEnd

public static final int WarningApplicationDefinedEnd
This is the highest value for an application-defined warning; consult the application's documentation for values between this and WarningApplicationDefinedEnd.

See Also:
Constant Field Values

ApplicationDefinedBase

public static final int ApplicationDefinedBase
This is the lowest value for an application-defined error; consult the application's documentation for values between this and ApplicationDefinedEnd.

See Also:
Constant Field Values

ApplicationDefinedEnd

public static final int ApplicationDefinedEnd
This is the highest value for an application-defined error; consult the application's documentation for values between this and ApplicationDefinedBase.

See Also:
Constant Field Values

LoadFailed

public static final int LoadFailed
A view failed to load.

See Also:
Constant Field Values

OpenFailed

public static final int OpenFailed
A view failed to open.

See Also:
Constant Field Values

ComposeFailed

public static final int ComposeFailed
A view failed to perform composition.

See Also:
Constant Field Values

RotoEntryFailed

public static final int RotoEntryFailed
The caller has requested an operation that is not implemented by this view.

See Also:
Constant Field Values

General

public static final int General
A general error occurred.

See Also:
Constant Field Values

RecordNotFound

public static final int RecordNotFound
The record specified does not exist in the view.

See Also:
Constant Field Values

RecordNoMoreData

public static final int RecordNoMoreData
No more records can be fetched.

See Also:
Constant Field Values

RecordExists

public static final int RecordExists
The record already exists.

See Also:
Constant Field Values

RecordDuplicate

public static final int RecordDuplicate
A record with the same key values already exists.

See Also:
Constant Field Values

RecordInvalid

public static final int RecordInvalid
The record contains some invalid values.

See Also:
Constant Field Values

RecordLocked

public static final int RecordLocked
The record has been locked by another process.

See Also:
Constant Field Values

RecordConflict

public static final int RecordConflict
The record has been modified by another user.

See Also:
Constant Field Values

RecordNotLocked

public static final int RecordNotLocked
The record is not locked and the requested task requires that the record be locked.

See Also:
Constant Field Values

TableExists

public static final int TableExists
The specified table already exists.

See Also:
Constant Field Values

TableNotFound

public static final int TableNotFound
The specified table could not be found.

See Also:
Constant Field Values

PermissionNone

public static final int PermissionNone
Permission was denied.

See Also:
Constant Field Values

MemoryNoMore

public static final int MemoryNoMore
The process is out of memory.

See Also:
Constant Field Values

MemoryBufferLimit

public static final int MemoryBufferLimit
The supplied memory buffer does not meet the required size of the requested operation.

See Also:
Constant Field Values

FilterSyntax

public static final int FilterSyntax
The filter string contains invalid syntax.

See Also:
Constant Field Values

FilterOther

public static final int FilterOther
An unspecified error occurred when parsing the filter string.

See Also:
Constant Field Values

KeyInvalid

public static final int KeyInvalid
Validation of the record key failed.

See Also:
Constant Field Values

KeyNumber

public static final int KeyNumber
The supplied key number is invalid.

See Also:
Constant Field Values

KeyChanged

public static final int KeyChanged
There was an attempt to change alternate key field values but the data dictionary does not permit them to be modified.

See Also:
Constant Field Values

FieldInvalid

public static final int FieldInvalid
Field validation failed.

See Also:
Constant Field Values

FieldNumber

public static final int FieldNumber
The supplied field number is not a valid field number in the view.

See Also:
Constant Field Values

FieldID

public static final int FieldID
The supplied field ID is not a valid field ID in the view.

See Also:
Constant Field Values

FieldDisabled

public static final int FieldDisabled
The call attempted to access a disabled field.

See Also:
Constant Field Values

FieldReadonly

public static final int FieldReadonly
The field is read-only.

See Also:
Constant Field Values

TransactionNone

public static final int TransactionNone
A transaction is required to perform the operation.

See Also:
Constant Field Values

TransactionOpen

public static final int TransactionOpen
A transaction is open and the requested operation requires that no transactions be open.

See Also:
Constant Field Values

RevisionProtocol

public static final int RevisionProtocol
There was an invalid state or call to revision APIs.

See Also:
Constant Field Values

DatabaseParameter

public static final int DatabaseParameter
There was an invalid database link, table handle or other parameters when calling database apis.

See Also:
Constant Field Values

DatabaseLimit

public static final int DatabaseLimit
The database resources were exceeded.

See Also:
Constant Field Values

DatabaseOther

public static final int DatabaseOther
There was an unspecified database error.

See Also:
Constant Field Values

DatabaseDictionary

public static final int DatabaseDictionary
The database dictionary is inconsistent.

See Also:
Constant Field Values

RPCFailed

public static final int RPCFailed
A remote procedure call failed

See Also:
Constant Field Values

OperationCancelled

public static final int OperationCancelled
A View operation was cancelled either by the user or the caller.

See Also:
Constant Field Values

NonViewError

public static final int NonViewError
The call failed but it was not caused by a view error.

See Also:
Constant Field Values
Constructor Detail

ViewException

public ViewException()
constructs an instance of ViewException with a return code of success


ViewException

public ViewException(int viewReturnCode)
constructs an instance of the ViewException class with the specified return code

Parameters:
viewReturnCode - the return code, as will be returned by getReason()

ViewException

public ViewException(int viewReturnCode,
                     java.lang.String message)
constructs an instance of the ViewException class with the specified return code and message

Parameters:
viewReturnCode - the return code, as will be returned by getReason()
message - the message is currently being ignored. This is being reviewed and the intention is that it will be passed to the superclass
Method Detail

getReason

public int getReason()
returns the error code that caused the exception to be thrown.

Returns:
the error code that caused the exception to be thrown.

getMessage

public java.lang.String getMessage()
This implementation currently returns null. This decision is being reviewed and it is likely that in future the message will represent the message passed in and the return code.

Overrides:
getMessage in class java.lang.Throwable

isWarning

public static boolean isWarning(int value)
Does the specified value denote a view warning?

Parameters:
value - the value to check
Returns:
true if the value denotes a warning, false if it represents an error or success

isError

public static boolean isError(int value)
Does the specified value denote a view error? Note that warnings do not count as errors; if the value does not denote an error it may denote a warning.

Parameters:
value - the value to check
Returns:
true if the value denotes an error


Copyright © 2011 Sage Software, Inc. All rights reserved.