/*
 * Copyright 2002-2006 Jahia Ltd
 *
 * Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDDL), 
 * Version 1.0 (the "License"), or (at your option) any later version; you may 
 * not use this file except in compliance with the License. You should have 
 * received a copy of the License along with this program; if not, you may obtain 
 * a copy of the License at 
 *
 *  http://www.jahia.org/license/
 *
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 */

function ClientException(msg, code, method, detail) {
	if (arguments.length == 0) return;
	AjxException.call(this, msg, code, method, detail);
}

ClientException.prototype = new AjxException;
ClientException.prototype.constructor = ClientException;

ClientException.prototype.toString =
function() {
	return "ClientException";
}

ClientException.CSFE_SVC_ERROR 				= "CSFE_SVC_ERROR";
ClientException.NETWORK_ERROR 				= "NETWORK_ERROR";
ClientException.NO_AUTH_TOKEN 				= "NO_AUTH_TOKEN";
ClientException.SOAP_ERROR 					= "SOAP_ERROR";

// CSFE Exceptions
ClientException.SVC_AUTH_EXPIRED 			= "service.AUTH_EXPIRED";
ClientException.SVC_AUTH_REQUIRED 			= "service.AUTH_REQUIRED";
ClientException.SVC_FAILURE 				= "service.FAILURE";
ClientException.SVC_INVALID_REQUEST 		= "service.INVALID_REQUEST";
ClientException.SVC_PARSE_ERROR 			= "service.PARSE_ERROR";
ClientException.SVC_PERM_DENIED 			= "service.PERM_DENIED";
ClientException.SVC_UNKNOWN_DOCUMENT 		= "service.UNKNOWN_DOCUMENT";
ClientException.SVC_WRONG_HOST 				= "service.WRONG_HOST";

ClientException.ACCT_AUTH_FAILED 			= "account.AUTH_FAILED";
ClientException.ACCT_EXISTS 				= "account.ACCOUNT_EXISTS";
ClientException.ACCT_INVALID_PASSWORD 		= "account.INVALID_PASSWORD";
ClientException.ACCT_INVALID_PREF_NAME 		= "account.INVALID_PREF_NAME";
ClientException.ACCT_INVALID_PREF_VALUE 	= "account.INVALID_PREF_VALUE";
ClientException.ACCT_NO_SUCH_ACCOUNT 		= "account.NO_SUCH_ACCOUNT";
ClientException.ACCT_NO_SUCH_SAVED_SEARCH 	= "account.NO_SUCH_SAVED_SEARCH";
ClientException.ACCT_NO_SUCH_TAG 			= "account.ACCT_NO_SUCH_TAG";
ClientException.ACCT_PASS_RECENTLY_USED 	= "account.PASSWORD_RECENTLY_USED";
ClientException.ACCT_PASS_CHANGE_TOO_SOON 	= "account.PASSWORD_CHANGE_TOO_SOON";
ClientException.DOMAIN_NOT_EMPTY			= "account.DOMAIN_NOT_EMPTY";

ClientException.COS_EXISTS 					= "account.COS_EXISTS";

ClientException.DOMAIN_EXISTS 				= "account.DOMAIN_EXISTS";

ClientException.MAIL_INVALID_NAME 			= "mail.INVALID_NAME";
ClientException.MAIL_NO_SUCH_FOLDER 		= "mail.NO_SUCH_FOLDER";
ClientException.MAIL_NO_SUCH_TAG 			= "mail.NO_SUCH_TAG";
ClientException.MAIL_NO_SUCH_CONV 			= "mail.NO_SUCH_CONV";
ClientException.MAIL_NO_SUCH_MSG 			= "mail.NO_SUCH_MSG";
ClientException.MAIL_NO_SUCH_PART 			= "mail.NO_SUCH_PART";
ClientException.MAIL_QUOTA_EXCEEDED 		= "mail.QUOTA_EXCEEDED";
ClientException.MAIL_QUERY_PARSE_ERROR 		= "mail.QUERY_PARSE_ERROR";
ClientException.MAIL_SEND_FAILURE           = "mail.SEND_FAILURE";