Update error-handling.md

Add how to log notices (deprecation notifications can help with discovering problems caused by old code).