[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RFC: svn_io_file_write_full and svn_io_file_read(_full)

From: Erik Huelsmann <e.huelsmann_at_gmx.net>
Date: 2003-11-25 20:30:45 CET

Talking to Greg Hudson on IRC about the problem of error messages and their
consistency, he pointed out to me that if I was changing the same error
message (at different places in the source) over and over again, then we might
have missed an opportunity for functional abstraction.

There are 54 occurrences of apr_file_write_full, most of which are followed
by a call to svn_error_createf with very similar error messages in the
specific message. There are 12 occurrence of apr_file_read_full and 10 of
apr_file_read, for which the same applies.

I propose to add at least one, but maybe three functions to the io.c file in


being wrappers around their apr counterparts like Julian Foad did for
apr_file_close in r7652.

The wrappers would extract the filename from the apr_file_t structure as is
done in apr_file_close and add that to the specific error message.

Those cases where the error reported in the code is not along the lines of
the one generated by svn_io_file_*, the old error can be passed up the chain
using the SVN_ERR_W macro in addition to what the svn_io_file_* routine



GMX Weihnachts-Special: Seychellen-Traumreise zu gewinnen!
Rentier entlaufen. Finden Sie Rudolph! Als Belohnung winken
tolle Preise. http://www.gmx.net/de/cgi/specialmail/
+++ GMX - die erste Adresse fr Mail, Message, More! +++
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 25 20:33:02 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.