org.jickr
Class FlickrException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.jickr.FlickrException
All Implemented Interfaces:
java.io.Serializable

public class FlickrException
extends java.lang.Exception

Generic exception thrown by Jickr objects. This exception is thrown primarily if an error is returned from Flickr, or Flickr returns unexpected data. Coding errors typically throw a FlickrRuntimeException. Please note that this exception has the notion of an error code, which corresponds to the error code returned by Flickr on any error.

See Also:
FlickrRuntimeException, Serialized Form

Constructor Summary
FlickrException(java.lang.String msg)
          Constructs an instance of FlickrException with the specified detail message.
FlickrException(java.lang.String msg, int code)
          Constructs an instance of FlickrException with the specified detail message.
FlickrException(java.lang.String msg, java.lang.Throwable cause)
          Constructs an instance of FlickrException with the specified detail message, and the root cause exception.
 
Method Summary
 int getCode()
          If the FlickrException is returned because of a Flickr Error, then this code is set to be the same as that returned by Flickr.
 
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

FlickrException

public FlickrException(java.lang.String msg)
Constructs an instance of FlickrException with the specified detail message.

Parameters:
msg - the detail message.

FlickrException

public FlickrException(java.lang.String msg,
                       int code)
Constructs an instance of FlickrException with the specified detail message.

Parameters:
msg - the detail message.
code - The error code for the message. This corresponds to the Flickr Error code. See the Flickr API documentation.

FlickrException

public FlickrException(java.lang.String msg,
                       java.lang.Throwable cause)
Constructs an instance of FlickrException with the specified detail message, and the root cause exception.

Parameters:
msg - the detail message.
cause - the root cause of the exception
Method Detail

getCode

public int getCode()
If the FlickrException is returned because of a Flickr Error, then this code is set to be the same as that returned by Flickr. See the Flickr API documentation for more information. This code is 0 if not set by Flickr.

Returns:
code Flickr return code.