adding error message to generatedocs