20 class XsException : 
public std::exception
 
   24         XsException(XsException 
const& e)
 
   25                 : m_code(e.m_code), m_description(e.m_description)
 
   43                 : m_code(err), m_description(description)
 
   45                 if (prefix && (m_code != 
XRV_OK))
 
   48                         sprintf(codeString, 
"%d: ", (
int)m_code);
 
   51                         if (!m_description.empty()) rv << 
"\tInfo: ";
 
   52                         rv.append(m_description);
 
   60         explicit XsException(
XsString const& description)
 
   61                 : m_code(
XRV_ERROR), m_description(description)
 
   66         virtual ~XsException() throw() {}
 
   68         XsException& operator=(XsException 
const& e)
 
   71                 m_description = e.m_description;
 
   78         inline char const* what() 
const throw() { 
return m_description.c_str(); }
 
   80         inline XsString const& text() 
const throw() { 
return m_description; }
 
   85         virtual void raise() 
const { 
throw * 
this; }
 
   95 #endif  // __cplusplus guard