declaration error handling