|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sage.accpac.sm.StringTooLongException
public class StringTooLongException
The StringTooLongException
class provides an unchecked exception
that is thrown when a string is too long to fit into an Accpac field or
similar.
Accpac is very heavily based upon fixed size buffers and so this exception is thrown when a String is offered that is too long for a fixed space.
Call getPermitted()
to determine how much of the string would fit
Constructor Summary | |
---|---|
StringTooLongException(java.lang.String string,
int permitted)
|
Method Summary | |
---|---|
java.lang.String |
getPermitted()
returns the portion of the string that would fit. |
java.lang.String |
getString()
returns the string that did not fit |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StringTooLongException(java.lang.String string, int permitted)
string
- the string that was being processedpermitted
- the number of characters of the string that were processedMethod Detail |
---|
public java.lang.String getString()
public java.lang.String getPermitted()
Note that the length of the string that fits is not fixed. One 30-character string may fit while a different one does not fit. That is why this returns the portion that fits rather than specifying the length permitted.
java.lang.NullPointerException
- if getString()
returns null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |