2001-09-26 02:43:09 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
1999-09-09 03:14:30 +04:00
|
|
|
*
|
2001-09-26 02:43:09 +04:00
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/NPL/
|
1999-09-09 03:14:30 +04:00
|
|
|
*
|
2001-09-26 02:43:09 +04:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1999-09-09 03:14:30 +04:00
|
|
|
*
|
1999-11-06 06:40:37 +03:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-26 02:43:09 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:40:37 +03:00
|
|
|
*
|
2001-09-26 02:43:09 +04:00
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
1999-09-09 03:14:30 +04:00
|
|
|
|
|
|
|
#ifndef nsDOMError_h__
|
|
|
|
#define nsDOMError_h__
|
|
|
|
|
|
|
|
#include "nsError.h"
|
|
|
|
|
1999-11-12 05:08:45 +03:00
|
|
|
// XXX If you add a new error code, also add an error string to
|
|
|
|
// dom/base/src/domerr.msg
|
|
|
|
|
1999-09-09 03:14:30 +04:00
|
|
|
/* DOM error codes from http://www.w3.org/TR/REC-DOM-Level-1/ */
|
|
|
|
|
|
|
|
#define NS_ERROR_DOM_INDEX_SIZE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1)
|
|
|
|
#define NS_ERROR_DOM_DOMSTRING_SIZE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,2)
|
|
|
|
#define NS_ERROR_DOM_HIERARCHY_REQUEST_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,3)
|
|
|
|
#define NS_ERROR_DOM_WRONG_DOCUMENT_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,4)
|
|
|
|
#define NS_ERROR_DOM_INVALID_CHARACTER_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,5)
|
|
|
|
#define NS_ERROR_DOM_NO_DATA_ALLOWED_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,6)
|
|
|
|
#define NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,7)
|
|
|
|
#define NS_ERROR_DOM_NOT_FOUND_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,8)
|
|
|
|
#define NS_ERROR_DOM_NOT_SUPPORTED_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,9)
|
|
|
|
#define NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,10)
|
|
|
|
|
2000-03-23 01:16:14 +03:00
|
|
|
/* DOM error codes from http://www.w3.org/TR/DOM-Level-2/ */
|
|
|
|
|
|
|
|
#define NS_ERROR_DOM_INVALID_ACCESS_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,11)
|
|
|
|
#define NS_ERROR_DOM_INVALID_MODIFICATION_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,12)
|
|
|
|
#define NS_ERROR_DOM_INVALID_STATE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,13)
|
|
|
|
#define NS_ERROR_DOM_NAMESPACE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,14)
|
|
|
|
#define NS_ERROR_DOM_SYNTAX_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,15)
|
|
|
|
|
2000-05-06 17:50:39 +04:00
|
|
|
/* DOM error codes from http://www.w3.org/TR/DOM-Level-2/range.html */
|
|
|
|
|
|
|
|
// Note! These should have their own error MODULE and correct codes
|
|
|
|
// (101 should be 1, 102 should be 2)
|
|
|
|
#define NS_ERROR_DOM_RANGE_BAD_BOUNDARYPOINTS_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,101)
|
|
|
|
#define NS_ERROR_DOM_RANGE_INVALID_NODE_TYPE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,102)
|
|
|
|
|
|
|
|
|
1999-09-09 03:14:30 +04:00
|
|
|
/* DOM error codes defined by us */
|
|
|
|
|
|
|
|
#define NS_ERROR_DOM_SECURITY_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1000)
|
|
|
|
#define NS_ERROR_DOM_SECMAN_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1001)
|
|
|
|
#define NS_ERROR_DOM_WRONG_TYPE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1002)
|
|
|
|
#define NS_ERROR_DOM_NOT_OBJECT_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1003)
|
|
|
|
#define NS_ERROR_DOM_NOT_XPC_OBJECT_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1004)
|
|
|
|
#define NS_ERROR_DOM_NOT_NUMBER_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1005)
|
|
|
|
#define NS_ERROR_DOM_NOT_BOOLEAN_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1006)
|
|
|
|
#define NS_ERROR_DOM_NOT_FUNCTION_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1007)
|
|
|
|
#define NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1008)
|
1999-10-02 07:41:37 +04:00
|
|
|
#define NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1009)
|
|
|
|
#define NS_ERROR_DOM_PROP_ACCESS_DENIED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1010)
|
|
|
|
#define NS_ERROR_DOM_XPCONNECT_ACCESS_DENIED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1011)
|
|
|
|
#define NS_ERROR_DOM_BAD_URI NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1012)
|
1999-11-05 01:02:19 +03:00
|
|
|
#define NS_ERROR_DOM_RETVAL_UNDEFINED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1013)
|
1999-09-09 03:14:30 +04:00
|
|
|
|
|
|
|
// XXX Not the right place for this.
|
|
|
|
#include "nsIDOMDOMException.h"
|
|
|
|
|
2001-10-23 05:37:21 +04:00
|
|
|
extern "C" nsresult NS_NewDOMException(nsIDOMDOMException** aException,
|
1999-09-09 03:14:30 +04:00
|
|
|
nsresult aResult,
|
|
|
|
const char* aName,
|
|
|
|
const char* aMessage,
|
|
|
|
const char* aLocation);
|
|
|
|
|
|
|
|
#endif // nsDOMError_h__
|