howto document and error handling