<-- Back to schedule

Error handling without fear

If you're like most developers you have a difficult relationship with error handling. You try to do \"enough of it\" to make your code work, but fundamentally errors make you uncomfortable and you want to avoid them as much as possible.

This is a logical reaction to errors when we first started programming - most errors were mistakes in our programs. But as you mature as a programmer errors are increasingly circumstances outside your control, and good error handling is essential to writing good code. It is the part of the iceberg under water.

This talk will teach you how to accept errors as something that is natural in any program and how to start thinking about error handling as part of \"what your program really is about\", rather than being a chore.

We will look at common classes of errors in domains like input validation, using libraries, and managing disk and network io operations, and discuss appropriate error handling strategies in each case. We will also discuss what kinds of errors we shouldn't try to handle at all, and why.

Finally, we will talk about how to approach testing error handling code and the pitfalls of overly clever error handling.

Martin Matusiak

Martin is a software engineer based in Amsterdam. He discovered Python in 2005 and has been a big fan of the language and of the community ever since and has participated in various open source projects for a long time. In his professional life he's worked a lot on web applications and web services. Recently he's become a coach and organizer of Django Girls, which is just the coolest thing in Python land right now!

Sponsors


Platinum


Gold