7
Error Handling and Logging
We described how Python and Go run and how they access the network in the previous chapter; however, we missed two important points when building our network automation solution: how we report program execution events and how we handle errors.
These two topics are not as easy as they seem, and they are, most of the time, implemented in the system poorly. Some network developers might not do it properly because of lack of knowledge, but there are also some developers that don’t do it properly because of time constraints and extra time needed for coding.
But are these activities really important? Let’s examine these in this chapter. First, let’s investigate how and why we handle errors and then why and how we do
Get Network Programming and Automation Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.