HubException¶
-
public class
HubException
extends Exception¶ This class is used for custom exception for the Hub Module
Author: anuranjan
Constructors¶
HubException¶
-
public
HubException
(HubErrors hubErrors)¶ Creates a new
HubException
instance fromorg.motechproject.hub.exception.HubErrors
passed as a parameter.Parameters: - hubErrors – the error that caused the exception
HubException¶
-
public
HubException
(HubErrors hubErrors, String reason)¶ Creates a new
HubException
instance fromorg.motechproject.hub.exception.HubErrors
and aString
describing error cause passed as a parameters.Parameters: - hubErrors – the error that caused the exception
- reason – reason for the error
HubException¶
-
public
HubException
(HubErrors hubErrors, Throwable throwable)¶ Creates a new
HubException
instance fromorg.motechproject.hub.exception.HubErrors
andThrowable
that caused this exception passed as a parameters.Parameters: - hubErrors – the error that caused the exception
- throwable – the underlying exception
HubException¶
-
public
HubException
(HubErrors hubErrors, Throwable throwable, String reason)¶ Creates a new
HubException
instance fromorg.motechproject.hub.exception.HubErrors
,Throwable
that caused this exception and aString
describing error cause passed as a parameters.Parameters: - hubErrors – the error that caused the exception
- throwable – the underlying exception
- reason – the reason for this error
Methods¶
getError¶
-
public HubErrors
getError
()¶ Gets the underlying
org.motechproject.hub.exception.HubErrors
error.Returns: the underlying org.motechproject.hub.exception.HubErrors
error
getErrorCode¶
-
public int
getErrorCode
()¶ Gets the error code for the underlying error.
Returns: the error code