<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Exceptions on Ghafoor's Personal Blog</title><link>http://ghafoorsblog.com/tags/exceptions/</link><description>Recent content in Exceptions on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>noreply@example.com (AG Sayyed)</managingEditor><webMaster>noreply@example.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><lastBuildDate>Sat, 16 May 2026 17:42:12 +0100</lastBuildDate><atom:link href="http://ghafoorsblog.com/tags/exceptions/index.xml" rel="self" type="application/rss+xml"/><item><title>Debug With Try-Except</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/04-module/004-with-try-catch/</link><pubDate>Thu, 13 Nov 2025 14:24:30 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/04-module/004-with-try-catch/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores debugging Python programs using try-except blocks to handle runtime errors gracefully. Topics include catching specific exceptions, creating custom exceptions, using finally clauses, accessing exception details, and best practices for proper exception handling without swallowing errors.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Try-except (often called &amp;ldquo;try-catch&amp;rdquo; in other languages) is a common programming paradigm for handling runtime errors or exceptions gracefully without crashing programs. This mechanism allows developers to anticipate potential errors and respond appropriately, whether by logging the error, informing users, or attempting recovery actions.&lt;/p&gt;</description></item><item><title>Python Crash Debugging</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/04-module/001-python-crash/</link><pubDate>Thu, 13 Nov 2025 12:40:27 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/04-module/001-python-crash/</guid><description>&lt;p class="lead text-primary"&gt;
This document provides a practical walkthrough of debugging Python exceptions using the PDB debugger, demonstrating how to analyze KeyError exceptions, investigate variable contents, identify UTF-8 Byte Order Mark (BOM) encoding issues, and implement fixes for CSV file processing.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;While C and C++ programs commonly crash with segmentation faults, Python applications typically fail with unexpected exceptions. Understanding how to debug these exceptions using Python&amp;rsquo;s PDB debugger is essential for diagnosing and fixing runtime errors in Python code.&lt;/p&gt;</description></item><item><title>Unhandled Errors</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/03-module/009-unhandled-errors/</link><pubDate>Thu, 13 Nov 2025 12:04:01 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/03-module/009-unhandled-errors/</guid><description>&lt;p class="lead text-primary"&gt;
This document explains how to handle unexpected errors and exceptions in high-level programming languages like Python, covering common error types, traceback analysis, debugging techniques including printf debugging and the logging module, and strategies for making programs resilient to failures.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;While high-level languages like Python, Java, and Ruby handle memory management automatically, programs written in these languages can still encounter unexpected conditions that cause failures. When code doesn&amp;rsquo;t properly handle these conditions, it triggers errors or exceptions, causing programs to terminate unexpectedly.&lt;/p&gt;</description></item></channel></rss>