2002-04-10 13:38:30 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2002-04-10 13:38:30 +00:00
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIBaseDOMException.h"
|
|
|
|
#include "nsIException.h"
|
|
|
|
|
|
|
|
class nsBaseDOMException : public nsIException,
|
|
|
|
public nsIBaseDOMException
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsBaseDOMException();
|
|
|
|
virtual ~nsBaseDOMException();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIEXCEPTION
|
|
|
|
NS_IMETHOD Init(nsresult aNSResult, const char* aName,
|
2012-04-11 21:55:21 +00:00
|
|
|
const char* aMessage, PRUint16 aCode,
|
2002-04-10 13:38:30 +00:00
|
|
|
nsIException* aDefaultException);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
nsresult mResult;
|
|
|
|
const char* mName;
|
|
|
|
const char* mMessage;
|
2012-04-11 21:55:21 +00:00
|
|
|
PRUint16 mCode; \
|
2002-04-10 13:38:30 +00:00
|
|
|
nsCOMPtr<nsIException> mInner;
|
|
|
|
};
|
|
|
|
|
2010-11-10 23:25:44 +00:00
|
|
|
nsresult
|
|
|
|
NS_GetNameAndMessageForDOMNSResult(nsresult aNSResult, const char** aName,
|
2012-04-24 23:50:00 +00:00
|
|
|
const char** aMessage,
|
|
|
|
PRUint16* aCode = nsnull);
|
2010-11-10 23:25:44 +00:00
|
|
|
|
2004-02-24 03:22:35 +00:00
|
|
|
#define DECL_INTERNAL_DOM_EXCEPTION(domname) \
|
2002-04-10 13:38:30 +00:00
|
|
|
nsresult \
|
|
|
|
NS_New##domname(nsresult aNSResult, nsIException* aDefaultException, \
|
2004-07-22 18:34:36 +00:00
|
|
|
nsIException** aException);
|
2004-02-24 03:22:35 +00:00
|
|
|
|
|
|
|
|
2004-07-22 18:34:36 +00:00
|
|
|
DECL_INTERNAL_DOM_EXCEPTION(DOMException)
|
|
|
|
DECL_INTERNAL_DOM_EXCEPTION(SVGException)
|
2006-01-07 17:35:24 +00:00
|
|
|
DECL_INTERNAL_DOM_EXCEPTION(XPathException)
|