Tag

custom-exception

0 views collected around this technical thread.

Java Captain
Java Captain
Mar 18, 2025 · Backend Development

Refactoring Spring MVC Controllers: Unified Response Structure, Parameter Validation, and Centralized Exception Handling

This article explains how to refactor the Spring MVC Controller layer by standardizing response structures, implementing unified response wrapping via ResponseBodyAdvice, handling String conversion issues, applying JSR‑303 parameter validation, creating custom validation rules, and defining custom exceptions with centralized exception handling to simplify controller code.

ControllerJavaParameter Validation
0 likes · 17 min read
Refactoring Spring MVC Controllers: Unified Response Structure, Parameter Validation, and Centralized Exception Handling
Code Mala Tang
Code Mala Tang
Feb 10, 2025 · Fundamentals

Master Python Exception Handling and Logging: Practical Guide with Code

This article explains why robust exception handling and logging are essential in Python development, introduces built‑in exception types, demonstrates try‑except‑else‑finally patterns, shows how to use assert and raise, creates custom exceptions, and provides practical logging examples with code snippets.

Exception HandlingPythoncustom-exception
0 likes · 12 min read
Master Python Exception Handling and Logging: Practical Guide with Code
php中文网 Courses
php中文网 Courses
Jan 3, 2025 · Backend Development

Effective Exception Handling in PHP for Robust Applications

This article explains why proper exception handling is essential for building robust PHP applications, covering the advantages of exceptions over error codes, how to throw, catch, and create custom exceptions, set up global handlers, convert errors to exceptions, and log them effectively.

BackendError ManagementException Handling
0 likes · 7 min read
Effective Exception Handling in PHP for Robust Applications
php中文网 Courses
php中文网 Courses
Nov 22, 2024 · Backend Development

Optimizing Exception Handling in PHP: Best Practices

This article explains how PHP developers can improve code stability and maintainability by using try‑catch blocks, creating custom exception classes, employing multiple catch clauses, adding finally blocks, and leveraging additional functions like throw and set_exception_handler, providing clear examples for each technique.

Exception HandlingPHPcustom-exception
0 likes · 5 min read
Optimizing Exception Handling in PHP: Best Practices
Test Development Learning Exchange
Test Development Learning Exchange
Jun 11, 2024 · Fundamentals

Comprehensive Guide to Python Exception Handling

This article explains Python exception handling fundamentals, covering basic try‑except, multiple exception catches, else/finally blocks, custom exceptions, exception propagation, raise‑from chaining, context manager handling, assert statements, generic suppression, and selective suppression with contextlib.

AssertContext ManagerException Handling
0 likes · 4 min read
Comprehensive Guide to Python Exception Handling
Java Captain
Java Captain
Mar 25, 2024 · Fundamentals

Understanding Exception Handling in Java SE

This article provides a comprehensive guide to Java SE exception handling, covering the concepts and classifications of checked and unchecked exceptions, the try‑catch‑finally structure, custom exception creation, exception chaining, and best‑practice recommendations for writing robust, maintainable Java code.

Exception HandlingJavabest practices
0 likes · 6 min read
Understanding Exception Handling in Java SE
Java Captain
Java Captain
May 4, 2018 · Fundamentals

Understanding Exception Handling in Java

This article explains Java's exception handling mechanism, covering try‑catch‑finally structures, the distinction between checked and unchecked exceptions, practical code examples for file I/O and custom exceptions, and best‑practice guidelines for designing robust error‑handling logic.

Exception HandlingJavacustom-exception
0 likes · 9 min read
Understanding Exception Handling in Java