File indexing completed on 2024-04-28 15:24:30
0001 /* 0002 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 0003 * Copyright (C) 2006 Apple Computer, Inc. 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Library General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2 of the License, or (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 * Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, write to 0017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 * 0020 */ 0021 0022 #ifndef SVGException_h 0023 #define SVGException_h 0024 0025 #if ENABLE(SVG) 0026 0027 /*#include "ExceptionBase.h"*/ 0028 #include "wtf/RefCounted.h" 0029 0030 namespace DOM 0031 { 0032 0033 class SVGException : public RefCounted<SVGException> /*: public ExceptionBase*/ 0034 { 0035 public: 0036 /*SVGException(const ExceptionCodeDescription& description) 0037 : ExceptionBase(description) 0038 { 0039 }*/ 0040 0041 static const int SVGExceptionOffset = 300; 0042 static const int SVGExceptionMax = 399; 0043 0044 enum SVGExceptionCode { 0045 SVG_WRONG_TYPE_ERR = SVGExceptionOffset, 0046 SVG_INVALID_VALUE_ERR = SVGExceptionOffset + 1, 0047 SVG_MATRIX_NOT_INVERTABLE = SVGExceptionOffset + 2 0048 }; 0049 0050 // KHTML compatibility code 0051 public: 0052 unsigned short code() const 0053 { 0054 return m_code; 0055 } 0056 DOM::DOMString name() const 0057 { 0058 return m_name; 0059 } 0060 DOM::DOMString message() const 0061 { 0062 return m_message; 0063 } 0064 0065 DOM::DOMString toString() const 0066 { 0067 // FIXME not implemented 0068 return DOMString(); 0069 } 0070 0071 private: 0072 unsigned short m_code; 0073 DOM::DOMString m_name; 0074 DOM::DOMString m_message; 0075 }; 0076 } 0077 0078 namespace WebCore 0079 { 0080 typedef DOM::SVGException SVGException; 0081 } // namespace WebCore 0082 0083 #endif // ENABLE(SVG) 0084 0085 #endif // SVGException_h