You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/03/28 08:10:18 UTC

cvs commit: xml-xalan/c/src/PlatformSupport XSLException.cpp XSLException.hpp

dbertoni    02/03/27 23:10:18

  Modified:    c/src/PlatformSupport XSLException.cpp XSLException.hpp
  Log:
  Added default error formatting.
  
  Revision  Changes    Path
  1.6       +91 -0     xml-xalan/c/src/PlatformSupport/XSLException.cpp
  
  Index: XSLException.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XSLException.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSLException.cpp	23 Feb 2002 04:17:46 -0000	1.5
  +++ XSLException.cpp	28 Mar 2002 07:10:18 -0000	1.6
  @@ -63,6 +63,11 @@
   
   
   
  +#include "XalanUnicode.hpp"
  +#include "DOMStringHelper.hpp"
  +
  +
  +
   XSLException::XSLException(
   		const XalanDOMString&	theMessage,
   		const XalanDOMString&	theURI,
  @@ -108,4 +113,90 @@
   
   XSLException::~XSLException()
   {
  +}
  +
  +
  +
  +XalanDOMString
  +XSLException::defaultFormat() const
  +{
  +	XalanDOMString	theBuffer;
  +
  +	defaultFormat(theBuffer);
  +
  +	return theBuffer;
  +}
  +
  +
  +
  +void
  +XSLException::defaultFormat(XalanDOMString&		theBuffer) const
  +{
  +	defaultFormat(m_message, m_uri, m_lineNumber, m_columnNumber, m_type, theBuffer);
  +}
  +
  +
  +
  +static
  +XalanDOMChar	colonString[] =
  +{
  +	XalanUnicode::charColon,
  +	XalanUnicode::charSpace,
  +	0
  +};
  +
  +
  +
  +static
  +XalanDOMChar	lineString[] =
  +{
  +	XalanUnicode::charComma,
  +	XalanUnicode::charSpace,
  +	XalanUnicode::charLetter_l,
  +	XalanUnicode::charLetter_i,
  +	XalanUnicode::charLetter_n,
  +	XalanUnicode::charLetter_e,
  +	XalanUnicode::charSpace,
  +	0
  +};
  +
  +
  +
  +static
  +XalanDOMChar	columnString[] =
  +{
  +	XalanUnicode::charComma,
  +	XalanUnicode::charSpace,
  +	XalanUnicode::charLetter_c,
  +	XalanUnicode::charLetter_o,
  +	XalanUnicode::charLetter_l,
  +	XalanUnicode::charLetter_u,
  +	XalanUnicode::charLetter_m,
  +	XalanUnicode::charLetter_n,
  +	XalanUnicode::charSpace,
  +	0
  +};
  +
  +
  +
  +void
  +XSLException::defaultFormat(
  +			const XalanDOMString&	theMessage,
  +			const XalanDOMString&	theURI,
  +			int						theLineNumber,
  +			int						theColumnNumber,
  +			const XalanDOMString&	theType,
  +			XalanDOMString&			theBuffer)
  +{
  +	theBuffer += theType;
  +	theBuffer += colonString;
  +	theBuffer += theMessage;
  +	theBuffer += XalanDOMChar(XalanUnicode::charSpace);
  +	theBuffer += XalanDOMChar(XalanUnicode::charLeftParenthesis);
  +	theBuffer += theURI;
  +	theBuffer += lineString;
  +	LongToDOMString(theLineNumber, theBuffer);
  +	theBuffer += columnString;
  +	LongToDOMString(theColumnNumber, theBuffer);
  +	theBuffer += XalanDOMChar(XalanUnicode::charRightParenthesis);
   }
  
  
  
  1.8       +15 -0     xml-xalan/c/src/PlatformSupport/XSLException.hpp
  
  Index: XSLException.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/XSLException.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSLException.hpp	19 Dec 2001 22:00:56 -0000	1.7
  +++ XSLException.hpp	28 Mar 2002 07:10:18 -0000	1.8
  @@ -172,6 +172,21 @@
   		return m_columnNumber;
   	}
   
  +	XalanDOMString
  +	defaultFormat() const;
  +
  +	void
  +	defaultFormat(XalanDOMString&	theBuffer) const;
  +
  +	static void
  +	defaultFormat(
  +			const XalanDOMString&	theMessage,
  +			const XalanDOMString&	theURI,
  +			int						theLineNumber,
  +			int						theColumnNumber,
  +			const XalanDOMString&	theType,
  +			XalanDOMString&			theBuffer);
  +
   private:
   	
   	const XalanDOMString	m_message;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org