updated error library to be consistent with document.