From 47faecc207f6a5e3f283561ed3ce4a3347dcd982 Mon Sep 17 00:00:00 2001 From: Omertron <> Date: Tue, 29 Jan 2013 20:48:50 +0000 Subject: [PATCH] Updated exception details --- .../themoviedbapi/MovieDbException.java | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/omertron/themoviedbapi/MovieDbException.java b/src/main/java/com/omertron/themoviedbapi/MovieDbException.java index 59930a6fd..f781b5112 100644 --- a/src/main/java/com/omertron/themoviedbapi/MovieDbException.java +++ b/src/main/java/com/omertron/themoviedbapi/MovieDbException.java @@ -21,10 +21,41 @@ package com.omertron.themoviedbapi; public class MovieDbException extends Exception { - private static final long serialVersionUID = -8952129102483143278L; + private static final long serialVersionUID = 1L; public enum MovieDbExceptionType { - UNKNOWN_CAUSE, INVALID_URL, HTTP_404_ERROR, MOVIE_ID_NOT_FOUND, MAPPING_FAILED, CONNECTION_ERROR, INVALID_IMAGE, AUTHORISATION_FAILURE; + /* + * Unknown error occured + */ + UNKNOWN_CAUSE, + /* + * URL is invalid + */ + INVALID_URL, + /* + * Page not found + */ + HTTP_404_ERROR, + /* + * The movie id was not found + */ + MOVIE_ID_NOT_FOUND, + /* + * Mapping failed from target to internal onbjects + */ + MAPPING_FAILED, + /* + * Error connecting to the service + */ + CONNECTION_ERROR, + /* + * Image was invalid + */ + INVALID_IMAGE, + /* + * Autorisation rejected + */ + AUTHORISATION_FAILURE; } private final MovieDbExceptionType exceptionType;