Index: openacs-4/packages/acs-developer-support/www/send.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/www/send.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-developer-support/www/send.tcl 4 Feb 2005 13:34:40 -0000 1.2 +++ openacs-4/packages/acs-developer-support/www/send.tcl 6 Feb 2005 18:10:01 -0000 1.3 @@ -15,10 +15,19 @@ } elseif {![empty_string_p $fname]} { ns_return 200 application/x-editlocal [ns_set get [ns_conn form] fname] } elseif {![empty_string_p $output]} { - if {[ns_cache get ds_page_bits $output content]} { - ns_return 200 text/plain "Size: [string length $content]\n\n------------------------------------------------------------\n$content" + if {[regexp {[0-9]+:error} $output]} { + if {[ns_cache get ds_page_bits $output content]} { + foreach error $content { + append out "PAGE: [lindex $error 0]\n[string repeat - 60]\n[lindex $error 1]\n\n\n" + } + ns_return 200 text/plain $out + } } else { - ns_return 200 text/plain "Output for $output has expired" + if {[ns_cache get ds_page_bits $output content]} { + ns_return 200 text/plain "Size: [string length $content]\n\n------------------------------------------------------------\n$content" + } else { + ns_return 200 text/plain "Output for $output has expired" + } } }