JSExceptionBase.cpp [plain text]
#include "config.h"
#include "JSExceptionBase.h"
#include "JSDOMCoreException.h"
#include "JSEventException.h"
#include "JSRangeException.h"
#include "JSSQLException.h"
#include "JSSVGException.h"
#include "JSXMLHttpRequestException.h"
#include "JSXPathException.h"
#include "SQLException.h"
namespace WebCore {
ExceptionBase* toExceptionBase(JSC::JSValue value)
{
if (DOMCoreException* domException = JSDOMCoreException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(domException);
if (RangeException* rangeException = JSRangeException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(rangeException);
if (EventException* eventException = JSEventException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(eventException);
if (XMLHttpRequestException* xmlHttpException = JSXMLHttpRequestException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(xmlHttpException);
if (SVGException* svgException = JSSVGException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(svgException);
if (XPathException* pathException = JSXPathException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(pathException);
if (SQLException* pathException = JSSQLException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(pathException);
return 0;
}
}