com.esri.arcgis.system
Class ExceptionHandler
java.lang.Object
com.esri.arcgis.system.ExceptionHandler
public final class ExceptionHandler
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionHandler
public ExceptionHandler()
getResourceBundleName
public static final String getResourceBundleName()
- Returns:
- the name of the resource bundle used for reporting common errors
handleArcObjectException
public static AOJException handleArcObjectException(Throwable throwable)
- Handles errors and exceptions. If the
throwable
parameter is
one of AutomationException, UnsatisfiedLinkError, UnknownHostException or IOException
this method consumes the throwable and throws a corresponding RuntimeException instead
(AOJException).
If the throwable
parameter is not one of
UnsatisfiedLinkError, UnknownHostException or IOException, this method
wraps the throwable in a RuntimeException and throws it.
Calling this method makes the next line of code unreachable because this
method always throws an unchecked exception.
- Parameters:
throwable
-
handleAutomationException
public static AOJException handleAutomationException(AutomationException ae)
- Generic AutomationException handler. AutomationExceptions can wrap Standard COM error
codes, Windows error codes, as well as Interface specific error codes. This method only
handles COM and Windows error codes wrapped in the AutomationException.
As the HRESULT can indicate different error conditions depending upon the ArcObject
assembly used, this method cannot handle AutomationExceptions containing Interface
specific error codes (HRESULTs where facility is FACILITY_ITF). These
AutomationExceptions must be filtered before calling this method.
Calling this method makes the next line of code unreachable because this
method always throws an unchecked exception.
- Parameters:
ae
-
getErrorCode
public static int getErrorCode(long hresult)
getFacility
public static int getFacility(long hresult)