Common subdirectories: ruby-xslt.0.9.1.org/debug and ruby-xslt/debug
Common subdirectories: ruby-xslt.0.9.1.org/examples and ruby-xslt/examples
diff -u ruby-xslt.0.9.1.org/parser.c ruby-xslt/parser.c
--- ruby-xslt.0.9.1.org/parser.c	2005-11-07 21:30:02.000000000 +0900
+++ ruby-xslt/parser.c	2005-11-08 23:43:04.810000000 +0900
@@ -27,6 +27,17 @@
 
 extern VALUE cXSLT;
 
+void xslt_raise(VALUE cError) {
+#ifdef USE_ERROR_HANDLER
+	VALUE errors = rb_cvar_get(cXSLT, rb_intern("@@errors"));
+	VALUE error_str = rb_ary_to_s(errors);
+	rb_ary_clear(errors);
+	rb_raise(cError, STR2CSTR(error_str));
+	return;
+#endif
+	rb_raise(cError, "");
+}
+
 xmlDocPtr parse_xml( char* xml, int iXmlType ) {
   xmlDocPtr tXMLDocument = NULL;
   
@@ -48,7 +59,7 @@
   }
 
   if( tXMLDocument == NULL ) {
-    rb_raise( eXSLTParsingError, "XML parsing error" );
+    xslt_raise( eXSLTParsingError );
     return( NULL );
   }
 
@@ -56,7 +67,7 @@
 
 #ifdef USE_ERROR_HANDLER
 	if(RARRAY(error_arr)->len > iInitialNumberOfErrors) {
-	  rb_raise( eXSLTTransformationError, "Stylesheet transformation error" );
+	  xslt_raise( eXSLTTransformationError );
 	}
 #endif
   
@@ -88,7 +99,7 @@
   if( iXslType == RUBY_XSLT_XSLSRC_TYPE_STR ) {
     tXSLDocument = xmlParseMemory( xsl, strlen( xsl ) );
     if( tXSLDocument == NULL ) {
-      rb_raise( eXSLTParsingError, "XSL parsing error" );
+      xslt_raise( eXSLTParsingError );
       return( NULL );
     }
 
@@ -98,7 +109,7 @@
   }
 
   if( tParsedXslt == NULL ) {
-    rb_raise( eXSLTParsingError, "XSL Stylesheet parsing error" );
+    xslt_raise( eXSLTParsingError );
     return( NULL );
   }
     
@@ -117,7 +128,7 @@
   
 #ifdef USE_ERROR_HANDLER
 	if(RARRAY(error_arr)->len > iInitialNumberOfErrors) {
-	  rb_raise( eXSLTTransformationError, "Stylesheet transformation error" );
+	  xslt_raise( eXSLTTransformationError );
 	}
 #endif
 
@@ -145,7 +156,7 @@
 
   tXMLDocumentResult = xsltApplyStylesheet( tParsedXslt, tXMLDocument, (const char**) pxParams );
   if( tXMLDocumentResult == NULL ) {
-    rb_raise( eXSLTTransformationError, "Stylesheet transformation error" );
+    xslt_raise( eXSLTTransformationError );
     return( NULL );
   }
   
@@ -162,7 +173,7 @@
 
 #ifdef USE_ERROR_HANDLER
 	if(RARRAY(error_arr)->len > iInitialNumberOfErrors) {
-	  rb_raise( eXSLTTransformationError, "Stylesheet transformation error" );
+	  xslt_raise( eXSLTTransformationError );
 	}
 #endif
 
@@ -203,7 +214,7 @@
   if( iXslType == RUBY_XSLT_XSLSRC_TYPE_STR ) {
     tXSLDocument = xmlParseMemory( xsl, strlen( xsl ) );
     if( tXSLDocument == NULL ) {
-      rb_raise( eXSLTParsingError, "XSL parsing error" );
+      xslt_raise( eXSLTParsingError );
       return( NULL );
     }
 
@@ -213,7 +224,7 @@
   }
 
   if( tParsedXslt == NULL ) {
-    rb_raise( eXSLTParsingError, "XSL Stylesheet parsing error" );
+    xslt_raise( eXSLTParsingError );
     return( NULL );
   }
     
@@ -232,20 +243,20 @@
   if( iXmlType == RUBY_XSLT_XMLSRC_TYPE_STR ) {
     tXMLDocument = xmlParseMemory( xml, strlen( xml ) );
     if( tXMLDocument == NULL ) {
-      rb_raise( eXSLTParsingError, "XML parsing error" );
+      xslt_raise( eXSLTParsingError );
       return( NULL );
     }
   } else if( iXmlType == RUBY_XSLT_XMLSRC_TYPE_FILE ) {
     tXMLDocument = xmlParseFile( xml );
     if( tXMLDocument == NULL ) {
-      rb_raise( eXSLTParsingError, "XML parsing error" );
+      xslt_raise( eXSLTParsingError );
       return( NULL );
     }
   }
   
   tXMLDocumentResult = xsltApplyStylesheet( tParsedXslt, tXMLDocument, (const char**) pxParams );
   if( tXMLDocumentResult == NULL ) {
-    rb_raise( eXSLTTransformationError, "Stylesheet transformation error" );
+    xslt_raise( eXSLTTransformationError );
     return( NULL );
   }
   
@@ -266,7 +277,7 @@
 
 #ifdef USE_ERROR_HANDLER
 	if(RARRAY(error_arr)->len > iInitialNumberOfErrors) {
-	  rb_raise( eXSLTTransformationError, "Stylesheet transformation error" );
+	  xslt_raise( eXSLTTransformationError );
 	}
 #endif
 
diff -u ruby-xslt.0.9.1.org/parser.h ruby-xslt/parser.h
--- ruby-xslt.0.9.1.org/parser.h	2005-11-07 21:05:38.000000000 +0900
+++ ruby-xslt/parser.h	2005-11-08 23:45:48.466250000 +0900
@@ -22,6 +22,7 @@
 xsltStylesheetPtr parse_xsl( char*, int );
 char* parse( xsltStylesheetPtr, xmlDocPtr, char ** );
 char* OLD__parse__OLD( char *, int, char *, int, char ** );
+void xslt_raise( VALUE );
 
 VALUE object_to_string( VALUE );
 
Common subdirectories: ruby-xslt.0.9.1.org/tests and ruby-xslt/tests
diff -u ruby-xslt.0.9.1.org/xslt.c ruby-xslt/xslt.c
--- ruby-xslt.0.9.1.org/xslt.c	2005-11-07 21:39:14.000000000 +0900
+++ ruby-xslt/xslt.c	2005-11-08 23:44:00.841250000 +0900
@@ -100,7 +100,7 @@
 
   pRbTxslt->tXMLDocument = parse_xml( STR2CSTR( pRbTxslt->xXmlData ), pRbTxslt->iXmlType );
   if( pRbTxslt->tXMLDocument == NULL ) {
-    rb_raise( eXSLTParsingError, "XML parsing error" );
+    xslt_raise( eXSLTParsingError );
   }
   
   pRbTxslt->iXmlType   = RUBY_XSLT_XMLSRC_TYPE_PARSED;
@@ -147,7 +147,7 @@
   
   pRbTxslt->tParsedXslt = parse_xsl( STR2CSTR( pRbTxslt->xXslData ), pRbTxslt->iXslType );
   if( pRbTxslt->tParsedXslt == NULL ) {
-    rb_raise( eXSLTParsingError, "XSL Stylesheet parsing error" );
+    xslt_raise( eXSLTParsingError );
   }
   
   pRbTxslt->iXslType   = RUBY_XSLT_XSLSRC_TYPE_PARSED;
@@ -351,7 +351,7 @@
   xmlSetGenericErrorFunc( NULL, xsltErrorFuncHandler );
   xsltSetGenericErrorFunc( NULL, xsltErrorFuncHandler );
   rb_define_class_variable( cXSLT, "@@errors", rb_ary_new());
-  rb_define_singleton_method( cXSLT, "errors", rb_xslt_errors, 0 );
+//  rb_define_singleton_method( cXSLT, "errors", rb_xslt_errors, 0 );
 #endif
 
 #ifdef USE_EXSLT
