1 //----------------------------------------------------------------------------
2 // Anti-Grain Geometry - Version 2.2
3 // Copyright (C) 2002-2004 Maxim Shemanarev (http://www.antigrain.com)
5 // Permission to copy, use, modify, sell and distribute this software
6 // is granted provided this copyright notice appears in all copies.
7 // This software is provided "as is" without express or implied
8 // warranty, and with no claim as to its suitability for any purpose.
10 //----------------------------------------------------------------------------
11 // Contact: mcseem@antigrain.com
12 // mcseemagg@yahoo.com
13 // http://www.antigrain.com
14 //----------------------------------------------------------------------------
18 //----------------------------------------------------------------------------
20 #ifndef SVG_EXCEPTION_H
21 #define SVG_EXCEPTION_H
38 exception() : m_msg(0) {}
40 exception(const char* fmt
, ...) :
45 m_msg
= new char [4096];
48 vsprintf(m_msg
, fmt
, arg
);
53 exception(const exception
& exc
) :
54 m_msg(exc
.m_msg
? new char[strlen(exc
.m_msg
) + 1] : 0)
56 if(m_msg
) strcpy(m_msg
, exc
.m_msg
);
59 const char* msg() const { return m_msg
; }
68 #endif // SVG_EXCEPTION_H