David Fraser - 2008-05-26

patch to return error codes