com.sap.exception.standard

Class SAPNumberFormatException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byjava.lang.IllegalArgumentException
                  extended byjava.lang.NumberFormatException
                      extended bycom.sap.exception.standard.SAPNumberFormatException
All Implemented Interfaces:
IBaseException, Serializable

public class SAPNumberFormatException
extends NumberFormatException
implements IBaseException

Wrapper class for NumberFormatException.

See Also:
Serialized Form

Field Summary
static String NOT_HEX_CHARACTER
           
static String NOT_HEX_CHARACTERS
           
static String PARAMETER_BOOLEAN_CONVERSION_ERROR
           
static String PARAMETER_DOUBLE_CONVERSION_ERROR
           
static String PARAMETER_INTEGER_CONVERSION_ERROR
           
static String PARAMETER_LONG_CONVERSION_ERROR
           
static String PROPERTY_BOOLEAN_CONVERSION_ERROR
           
static String PROPERTY_DOUBLE_CONVERSION_ERROR
           
static String PROPERTY_INTEGER_CONVERSION_ERROR
           
static String PROPERTY_LONG_CONVERSION_ERROR
           
 
Fields inherited from interface com.sap.exception.IBaseException
audit, defaultLocale
 
Constructor Summary
protected SAPNumberFormatException(Category cat, int severity, Location loc, ResourceAccessor resAccessor, String patternKey, Object[] args, Throwable rootCause)
          Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility.
  SAPNumberFormatException(Category cat, int severity, Location loc, String patternKey, Object[] args, Throwable rootCause)
          Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility.
protected SAPNumberFormatException(Location loc, ResourceAccessor resAccessor, String patternKey, Object[] args, Throwable cause)
          Constructs an exception with a localizable message and a root cause.
  SAPNumberFormatException(Location loc, String patternKey)
          Constructs an exception with a localizable message.
  SAPNumberFormatException(Location loc, String patternKey, Object[] args)
          Constructs an exception with a localizable message.
  SAPNumberFormatException(Location loc, String patternKey, Object[] args, Throwable cause)
          Constructs an exception with a localizable message and a root cause.
  SAPNumberFormatException(Location loc, String patternKey, Throwable cause)
          Constructs an exception with a localizable message and a root cause.
  SAPNumberFormatException(Location loc, Throwable rootCause)
          Constructs an exception with the specified root cause, which caused this exception.
protected SAPNumberFormatException(ResourceAccessor resAccessor, String patternKey, Object[] args, Throwable cause)
          Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.
  SAPNumberFormatException(String patternKey)
          Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.
  SAPNumberFormatException(String patternKey, Object[] args)
          Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.
  SAPNumberFormatException(String patternKey, Object[] args, Throwable cause)
          Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.
  SAPNumberFormatException(String patternKey, Throwable cause)
          Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.
  SAPNumberFormatException(Throwable rootCause)
          Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.
 
Method Summary
 void finallyLocalize()
          Finally localizes the LocalizableText message (if there is one attached).
 void finallyLocalize(Locale loc)
          Finally localizes the LocalizableText message (if there is one attached).
 void finallyLocalize(Locale loc, TimeZone timeZone)
          Finally localizes the LocalizableText message (if there is one attached).
 void finallyLocalize(TimeZone timeZone)
          Finally localizes the LocalizableText message (if there is one attached).
 Throwable getCause()
          Getter method for root cause.
 LocalizableText getLocalizableMessage()
          Getter method for localizable message.
 String getLocalizedMessage()
          Gets localized message.
 String getLocalizedMessage(Locale loc)
          Gets localized message.
 String getLocalizedMessage(Locale loc, TimeZone timeZone)
          Gets localized message.
 String getLocalizedMessage(TimeZone timeZone)
          Gets localized message.
 Category getLogCategory()
          Getter method for logging category.
 Location getLogLocation()
          Getter method for logging location.
 int getLogSeverity()
          Getter method for logging severity.
 String getMessage()
           
 String getNestedLocalizedMessage()
          Chains localized messages of the nested exceptions.
 String getNestedLocalizedMessage(Locale loc)
          Chains localized messages of the nested exceptions.
 String getNestedLocalizedMessage(Locale loc, TimeZone timeZone)
          Chains localized message of the nested exceptions.
 String getNestedLocalizedMessage(TimeZone timeZone)
          Chains localized message of the nested exceptions.
 String getNestedStackTraceString()
          Chains the stack trace information of nested exceptions.
 String getStackTraceString()
          Gets stack trace information of this exception only.
 String getSystemStackTraceString()
          Gets the stack information of this exception in respect of the current system environment.
 Throwable initCause(Throwable cause)
          Initializes the cause of this exception to the specified value.
 void log()
          Logs the exception message.
 void printStackTrace()
          Prints this exception and its backtrace to the standard error stream.
 void printStackTrace(PrintStream s)
          Prints this exception and its backtrace to the specified print stream.
 void printStackTrace(PrintWriter s)
          Prints the action object and its backtrace to the specified print writer.
 void restoreLogSettings()
          Restores log settings to their original values before method setLogSettings(Category, int, Location) has been used.
 void setLogSettings(Category cat, int severity, Location loc)
          Setter method for logging information.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_HEX_CHARACTER

public static final String NOT_HEX_CHARACTER
See Also:
Constant Field Values

NOT_HEX_CHARACTERS

public static final String NOT_HEX_CHARACTERS
See Also:
Constant Field Values

PARAMETER_BOOLEAN_CONVERSION_ERROR

public static final String PARAMETER_BOOLEAN_CONVERSION_ERROR
See Also:
Constant Field Values

PARAMETER_LONG_CONVERSION_ERROR

public static final String PARAMETER_LONG_CONVERSION_ERROR
See Also:
Constant Field Values

PARAMETER_DOUBLE_CONVERSION_ERROR

public static final String PARAMETER_DOUBLE_CONVERSION_ERROR
See Also:
Constant Field Values

PARAMETER_INTEGER_CONVERSION_ERROR

public static final String PARAMETER_INTEGER_CONVERSION_ERROR
See Also:
Constant Field Values

PROPERTY_BOOLEAN_CONVERSION_ERROR

public static final String PROPERTY_BOOLEAN_CONVERSION_ERROR
See Also:
Constant Field Values

PROPERTY_LONG_CONVERSION_ERROR

public static final String PROPERTY_LONG_CONVERSION_ERROR
See Also:
Constant Field Values

PROPERTY_DOUBLE_CONVERSION_ERROR

public static final String PROPERTY_DOUBLE_CONVERSION_ERROR
See Also:
Constant Field Values

PROPERTY_INTEGER_CONVERSION_ERROR

public static final String PROPERTY_INTEGER_CONVERSION_ERROR
See Also:
Constant Field Values
Constructor Detail

SAPNumberFormatException

public SAPNumberFormatException(Throwable rootCause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.

Constructs an exception with the specified root cause, which caused this exception.

Parameters:
rootCause - throwable object which caused this exception

SAPNumberFormatException

public SAPNumberFormatException(Location loc,
                                Throwable rootCause)
Constructs an exception with the specified root cause, which caused this exception.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location
rootCause - rootCause throwable object which caused this exception

SAPNumberFormatException

public SAPNumberFormatException(Category cat,
                                int severity,
                                Location loc,
                                String patternKey,
                                Object[] args,
                                Throwable rootCause)
Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility.

Constructs an exception with a localizable text message and the specified root cause, which caused this exception.

Parameters:
cat - logging category
severity - logging severity
loc - logging location
patternKey - message key
args - format arguments
rootCause - throwable object, which caused this exception

SAPNumberFormatException

protected SAPNumberFormatException(Category cat,
                                   int severity,
                                   Location loc,
                                   ResourceAccessor resAccessor,
                                   String patternKey,
                                   Object[] args,
                                   Throwable rootCause)
Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility.

Constructs an exception with a localizable text message and the specified root cause, which caused this exception.

Parameters:
cat - logging category
severity - logging severity
loc - logging location
resAccessor - resource accessor
patternKey - message key
args - format arguments
rootCause - throwable object, which caused this exception

SAPNumberFormatException

public SAPNumberFormatException(String patternKey)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.

Constructs an exception with a localizable message. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
patternKey - message key

SAPNumberFormatException

public SAPNumberFormatException(Location loc,
                                String patternKey)
Constructs an exception with a localizable message. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location
patternKey - patternKey message key

SAPNumberFormatException

public SAPNumberFormatException(String patternKey,
                                Object[] args)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.

Constructs an exception with a localizable message. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
patternKey - message key
args - format arguments

SAPNumberFormatException

public SAPNumberFormatException(Location loc,
                                String patternKey,
                                Object[] args)
Constructs an exception with a localizable message. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location
patternKey - message key
args - format arguments

SAPNumberFormatException

public SAPNumberFormatException(String patternKey,
                                Throwable cause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.

Constructs an exception with a localizable message and a root cause. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
patternKey - message key
cause - root cause

SAPNumberFormatException

public SAPNumberFormatException(Location loc,
                                String patternKey,
                                Throwable cause)
Constructs an exception with a localizable message and a root cause. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location
patternKey - message key
cause - root cause

SAPNumberFormatException

public SAPNumberFormatException(String patternKey,
                                Object[] args,
                                Throwable cause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.

Constructs an exception with a localizable message and a root cause. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
patternKey - message key
args - format arguments
cause - root cause

SAPNumberFormatException

public SAPNumberFormatException(Location loc,
                                String patternKey,
                                Object[] args,
                                Throwable cause)
Constructs an exception with a localizable message and a root cause. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location
patternKey - message key
args - format arguments
cause - root cause

SAPNumberFormatException

protected SAPNumberFormatException(ResourceAccessor resAccessor,
                                   String patternKey,
                                   Object[] args,
                                   Throwable cause)
Deprecated. Every constructor must have an location as input parameter to make possible automatic exception tracing. The method is left for backward compatibility.

Constructs an exception with a localizable message and a root cause. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
resAccessor - resource accessor
patternKey - message key
args - format arguments
cause - root cause

SAPNumberFormatException

protected SAPNumberFormatException(Location loc,
                                   ResourceAccessor resAccessor,
                                   String patternKey,
                                   Object[] args,
                                   Throwable cause)
Constructs an exception with a localizable message and a root cause. The LocalizableTextFormatter class is used for the localizable message.

Parameters:
loc - logging location which will be used in case of automatic tracing logging location
resAccessor - resource accessor
patternKey - message key
args - format arguments
cause - root cause
Method Detail

initCause

public Throwable initCause(Throwable cause)
Description copied from interface: IBaseException
Initializes the cause of this exception to the specified value. (The cause is the throwable that caused this exception to get thrown.)

This method can be called at most once. That means the cause can be specified only once.

Specified by:
initCause in interface IBaseException
See Also:
IBaseException.initCause(Throwable)

getCause

public Throwable getCause()
Description copied from interface: IBaseException
Getter method for root cause.

Specified by:
getCause in interface IBaseException
See Also:
IBaseException.getCause()

getLocalizedMessage

public String getLocalizedMessage()
Description copied from interface: IBaseException
Gets localized message.

The default locale and default time zone are used for localization.

These values have no effect if the finallyLocalize method has already been called.

Specified by:
getLocalizedMessage in interface IBaseException
See Also:
IBaseException.getLocalizedMessage()

getLocalizableMessage

public LocalizableText getLocalizableMessage()
Description copied from interface: IBaseException
Getter method for localizable message.

Specified by:
getLocalizableMessage in interface IBaseException
Returns:
localizable message or null
See Also:
IBaseException.getLocalizableMessage()

getLocalizedMessage

public String getLocalizedMessage(Locale loc)
Description copied from interface: IBaseException
Gets localized message.

The specified locale and the default time zone are used for localization. The default locale will be used if the locale parameter is null.

These values have no effect if the finallyLocalize method has been already called.

Specified by:
getLocalizedMessage in interface IBaseException
Parameters:
loc - locale
Returns:
message string or null
See Also:
IBaseException.getLocalizedMessage(Locale)

getLocalizedMessage

public String getLocalizedMessage(TimeZone timeZone)
Description copied from interface: IBaseException
Gets localized message.

The specified time zone and the default locale are used for localization. The default time zone will be used, if the time zone parameter is null.

These values have no effect if the finallyLocalize method has been already called.

Specified by:
getLocalizedMessage in interface IBaseException
Parameters:
timeZone - time zone
Returns:
message string or null
See Also:
IBaseException.getLocalizedMessage(TimeZone)

getLocalizedMessage

public String getLocalizedMessage(Locale loc,
                                  TimeZone timeZone)
Description copied from interface: IBaseException
Gets localized message.

The specified time zone and locale are used for localization. The default time zone and the default locale will be used, if the time zone parameter or the locale are null respectively.

These values have no effect if the finallyLocalize method has been already called.

Specified by:
getLocalizedMessage in interface IBaseException
Parameters:
loc - locale
timeZone - time zone
Returns:
message string or null
See Also:
IBaseException.getLocalizedMessage(Locale, TimeZone)

getNestedLocalizedMessage

public String getNestedLocalizedMessage()
Description copied from interface: IBaseException
Chains localized messages of the nested exceptions.

The default locale and the default time zone are used for localization.

These values have no effect if the finallyLocalize method has already been called.

Specified by:
getNestedLocalizedMessage in interface IBaseException
Returns:
message string or null
See Also:
IBaseException.getNestedLocalizedMessage()

getNestedLocalizedMessage

public String getNestedLocalizedMessage(Locale loc)
Description copied from interface: IBaseException
Chains localized messages of the nested exceptions.

The specified locale and the default time zone are used for localization. The default locale will be used if the Locale parameter is null.

These values have no effect if the finallyLocalize method has been already called.

Specified by:
getNestedLocalizedMessage in interface IBaseException
Parameters:
loc - locale
Returns:
message string or null
See Also:
IBaseException.getNestedLocalizedMessage(Locale)

getNestedLocalizedMessage

public String getNestedLocalizedMessage(TimeZone timeZone)
Description copied from interface: IBaseException
Chains localized message of the nested exceptions.

The specified time zone and the default locale are used for localization. The default time zone will be used, if the time zone parameter is null.

These values have no effect if the finallyLocalize method has been already called.

If the localized message is not specified, the non-localizable message is returned (if specified).

Specified by:
getNestedLocalizedMessage in interface IBaseException
Parameters:
timeZone - time zone
Returns:
message string or null
See Also:
IBaseException.getNestedLocalizedMessage(TimeZone)

getNestedLocalizedMessage

public String getNestedLocalizedMessage(Locale loc,
                                        TimeZone timeZone)
Description copied from interface: IBaseException
Chains localized message of the nested exceptions.

The specified time zone and locale are used for localization. The default time zone and the default locale will be used, if the time zone parameter or the locale parameter are null respectively.

These values have no effect if the finallyLocalize method has been already called.

Specified by:
getNestedLocalizedMessage in interface IBaseException
Parameters:
loc - locale
timeZone - time zone
Returns:
message string
See Also:
IBaseException.getNestedLocalizedMessage(Locale, TimeZone)

finallyLocalize

public void finallyLocalize()
Description copied from interface: IBaseException
Finally localizes the LocalizableText message (if there is one attached).

That means no further localization process can be performed on that object. If there is a nested exception implementing IBaseException, it will be localized recursively.

The default locale and the default time zone are used for localization.

Specified by:
finallyLocalize in interface IBaseException
See Also:
IBaseException.finallyLocalize()

finallyLocalize

public void finallyLocalize(Locale loc)
Description copied from interface: IBaseException
Finally localizes the LocalizableText message (if there is one attached).

That means no further localization process can be performed on that object. If there is a nested exception implementing IBaseException, it will be localized recursively.

The specified locale and the default time zone are used for localization. If the locale parameter is null, the default locale will be used.

Specified by:
finallyLocalize in interface IBaseException
Parameters:
loc - locale
See Also:
IBaseException.finallyLocalize(Locale)

finallyLocalize

public void finallyLocalize(TimeZone timeZone)
Description copied from interface: IBaseException
Finally localizes the LocalizableText message (if there is one attached).

That means no further localization process can be performed on that object. If there is a nested exception implementing IBaseException, it will be localized recursively.

The specified time zone and the default locale are used for localization. If time zone parameter is null, the default time zone will be used.

Specified by:
finallyLocalize in interface IBaseException
Parameters:
timeZone - time zone
See Also:
IBaseException.finallyLocalize(TimeZone)

finallyLocalize

public void finallyLocalize(Locale loc,
                            TimeZone timeZone)
Description copied from interface: IBaseException
Finally localizes the LocalizableText message (if there is one attached).

That means no further localization process can be performed on that object.If there is a nested exception implementing IBaseException, it will be localized recursively.

The specified locale and the specified time zone are used for localization. If the time zone parameter or the locale parameter are null, the default values will be used respectively.

Specified by:
finallyLocalize in interface IBaseException
Parameters:
loc - locale
timeZone - time zone
See Also:
IBaseException.finallyLocalize(Locale, TimeZone)

getSystemStackTraceString

public String getSystemStackTraceString()
Gets the stack information of this exception in respect of the current system environment.

Specified by:
getSystemStackTraceString in interface IBaseException
Returns:
the stack trace as a string in respect of the current system
See Also:
IBaseException.getSystemStackTraceString()

getStackTraceString

public String getStackTraceString()
Description copied from interface: IBaseException
Gets stack trace information of this exception only.

The stack traces of nested exceptions are not chained.

Specified by:
getStackTraceString in interface IBaseException
Returns:
the stack trace as a string without information of chained exceptions.
See Also:
IBaseException.getStackTraceString()

getNestedStackTraceString

public String getNestedStackTraceString()
Description copied from interface: IBaseException
Chains the stack trace information of nested exceptions.

The caused stack trace is displayed first.

Specified by:
getNestedStackTraceString in interface IBaseException
Returns:
the stack trace as a string
See Also:
IBaseException.getNestedStackTraceString()

setLogSettings

public void setLogSettings(Category cat,
                           int severity,
                           Location loc)
Deprecated. Category and severity must not be used inside of Exception API. The method is left for backward compatibility.

Description copied from interface: IBaseException
Setter method for logging information.

Specified by:
setLogSettings in interface IBaseException
Parameters:
cat - logging category
severity - logging severity
loc - logging location
See Also:
IBaseException.setLogSettings(Category, int, Location)

log

public void log()
Deprecated. Instead of this method it should be used some suitable method from Logging API. The method is left for backward compatibility.

Description copied from interface: IBaseException
Logs the exception message. The logging takes only place if the category and location are set properly.

Specified by:
log in interface IBaseException
See Also:
IBaseException.log()

printStackTrace

public void printStackTrace()
Description copied from interface: IBaseException
Prints this exception and its backtrace to the standard error stream. This method prints a stack trace for this exception object on the error output stream that is the value of the field System.err.

Specified by:
printStackTrace in interface IBaseException
See Also:
IBaseException.printStackTrace()

printStackTrace

public void printStackTrace(PrintStream s)
Description copied from interface: IBaseException
Prints this exception and its backtrace to the specified print stream.

Specified by:
printStackTrace in interface IBaseException
See Also:
IBaseException.printStackTrace(PrintStream)

printStackTrace

public void printStackTrace(PrintWriter s)
Description copied from interface: IBaseException
Prints the action object and its backtrace to the specified print writer.

Specified by:
printStackTrace in interface IBaseException
See Also:
IBaseException.printStackTrace(PrintWriter)

getMessage

public String getMessage()
See Also:
getLocalizedMessage()

getLogCategory

public Category getLogCategory()
Getter method for logging category.

If no category is specified, null is returned.

Returns:
logging category

getLogSeverity

public int getLogSeverity()
Getter method for logging severity.

If no severity is specified, Severity.NONE is returned.

Returns:
logging severity

getLogLocation

public Location getLogLocation()
Getter method for logging location.

If no location is specified, null is returned.

Returns:
logging location

restoreLogSettings

public void restoreLogSettings()
Restores log settings to their original values before method setLogSettings(Category, int, Location) has been used.

See Also:
setLogSettings(Category, int, Location)


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.