com.microsoft.tfs.core.httpclient
Class URIException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by com.microsoft.tfs.core.httpclient.HttpException
                  extended by com.microsoft.tfs.core.httpclient.URIException
All Implemented Interfaces:
java.io.Serializable

public class URIException
extends HttpException

The URI parsing and escape encoding exception.

See Also:
Serialized Form

Field Summary
static int ESCAPING
          The URI escape encoding and decoding error.
static int PARSING
          The URI parsing error.
static int PUNYCODE
          The DNS punycode encoding or decoding error.
protected  java.lang.String reason
          The reason message.
protected  int reasonCode
          The reason code.
static int UNKNOWN
          No specified reason code.
static int UNSUPPORTED_ENCODING
          The unsupported character encoding.
 
Constructor Summary
URIException()
          Default constructor.
URIException(int reasonCode)
          The constructor with a reason code argument.
URIException(int reasonCode, java.lang.String reason)
          The constructor with a reason string and its code arguments.
URIException(java.lang.String reason)
          The constructor with a reason string argument.
 
Method Summary
 java.lang.String getReason()
          Deprecated. You should instead call Throwable.getMessage().
 int getReasonCode()
          Get the reason code.
 void setReason(java.lang.String reason)
          Deprecated. Callers should instead set this via a parameter to the constructor.
 void setReasonCode(int reasonCode)
          Deprecated. Callers should set the reason code as a parameter to the constructor.
 
Methods inherited from class com.microsoft.tfs.core.httpclient.HttpException
getCause, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
No specified reason code.

Constant Field Value:
0
See Also:
Constant Field Values

PARSING

public static final int PARSING
The URI parsing error.

Constant Field Value:
1
See Also:
Constant Field Values

UNSUPPORTED_ENCODING

public static final int UNSUPPORTED_ENCODING
The unsupported character encoding.

Constant Field Value:
2
See Also:
Constant Field Values

ESCAPING

public static final int ESCAPING
The URI escape encoding and decoding error.

Constant Field Value:
3
See Also:
Constant Field Values

PUNYCODE

public static final int PUNYCODE
The DNS punycode encoding or decoding error.

Constant Field Value:
4
See Also:
Constant Field Values

reasonCode

protected int reasonCode
The reason code.


reason

protected java.lang.String reason
The reason message.

Constructor Detail

URIException

public URIException()
Default constructor.


URIException

public URIException(int reasonCode)
The constructor with a reason code argument.

Parameters:
reasonCode - the reason code

URIException

public URIException(int reasonCode,
                    java.lang.String reason)
The constructor with a reason string and its code arguments.

Parameters:
reasonCode - the reason code
reason - the reason

URIException

public URIException(java.lang.String reason)
The constructor with a reason string argument.

Parameters:
reason - the reason
Method Detail

getReasonCode

public int getReasonCode()
Get the reason code.

Overrides:
getReasonCode in class HttpException
Returns:
the reason code

setReasonCode

@Deprecated
public void setReasonCode(int reasonCode)
Deprecated. Callers should set the reason code as a parameter to the constructor.

Set the reason code.

Overrides:
setReasonCode in class HttpException
Parameters:
reasonCode - the reason code

getReason

@Deprecated
public java.lang.String getReason()
Deprecated. You should instead call Throwable.getMessage().

Get the reason message.

Overrides:
getReason in class HttpException
Returns:
the reason message

setReason

@Deprecated
public void setReason(java.lang.String reason)
Deprecated. Callers should instead set this via a parameter to the constructor.

Set the reason message.

Overrides:
setReason in class HttpException
Parameters:
reason - the reason message


© 2015 Microsoft. All rights reserved.