1 /*
  2  * ***** BEGIN LICENSE BLOCK *****
  3  * Zimbra Collaboration Suite Web Client
  4  * Copyright (C) 2005, 2006, 2007, 2009, 2010, 2013, 2014, 2016 Synacor, Inc.
  5  *
  6  * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License");
  7  * you may not use this file except in compliance with the License.
  8  * You may obtain a copy of the License at: https://www.zimbra.com/license
  9  * The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15
 10  * have been added to cover use of software over a computer network and provide for limited attribution
 11  * for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
 12  *
 13  * Software distributed under the License is distributed on an "AS IS" basis,
 14  * WITHOUT WARRANTY OF ANY KIND, either express or implied.
 15  * See the License for the specific language governing rights and limitations under the License.
 16  * The Original Code is Zimbra Open Source Web Client.
 17  * The Initial Developer of the Original Code is Zimbra, Inc.  All rights to the Original Code were
 18  * transferred by Zimbra, Inc. to Synacor, Inc. on September 14, 2015.
 19  *
 20  * All portions of the code are Copyright (C) 2005, 2006, 2007, 2009, 2010, 2013, 2014, 2016 Synacor, Inc. All Rights Reserved.
 21  * ***** END LICENSE BLOCK *****
 22  */
 23 
 24 /**
 25  * Creates an exception.
 26  * @constructor
 27  * @class
 28  * This is the base class for all exceptions in the Ajax toolkit.
 29  * 
 30  * @author Ross Dargahi
 31  * 
 32  * @param {string} [msg] 		the human readable message
 33  * @param {string|number} [code]	 any error or fault code
 34  * @param {string} [method] 	the name of the method throwing the exception
 35  * @param {string} [detail] 	any additional detail
 36  * 
 37  * @extends		AjxException
 38  */
 39 DwtException = function(msg, code, method, detail) {
 40 	if (arguments.length === 0) {return;}
 41 	AjxException.call(this, msg, code, method, detail);
 42 }
 43 
 44 DwtException.prototype = new AjxException();
 45 DwtException.prototype.constructor = DwtException;
 46 
 47 DwtException.prototype.toString = 
 48 function() {
 49 	return "DwtException";
 50 };
 51 
 52 /**
 53  * Invalid parent exception code.
 54  */
 55 DwtException.INVALIDPARENT = -1;
 56 
 57 /**
 58  * Invalid operation exception code.
 59  */
 60 DwtException.INVALID_OP = -2;
 61 
 62 /**
 63  * Internal error exception code.
 64  */
 65 DwtException.INTERNAL_ERROR = -3;
 66 
 67 /**
 68  * Invalid parameter exception code.
 69  */
 70 DwtException.INVALID_PARAM = -4;
 71