Tagged articles
custom-exception
17 articles · Page 1 of 1
This article presents eight ready‑to‑use Spring Boot 3.5.0 code snippets—including MapStruct converters, embeddable collections, i18n helpers, secure random generators, custom runtime exceptions, type‑safe configuration properties, JPA auditing, and custom validation annotations—each illustrated with concrete examples and runnable code.
MapStructSpring Bootconfiguration-properties
0 likes · 13 min read

This article explains why custom exceptions are essential for clear, domain‑specific error reporting in C++, shows step‑by‑step how to define them by inheriting from standard exception classes, provides practical code examples, and outlines best practices for designing maintainable exception hierarchies.
Best PracticesC++custom-exception
0 likes · 8 min read

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.
ControllerJavaResponseBodyAdvice
0 likes · 17 min read

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.
DebuggingException HandlingLogging
0 likes · 12 min read

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.
Backendcustom-exceptionerror-management
0 likes · 7 min read

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.
custom-exceptionerror handlingexception-handling
0 likes · 5 min read

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.
Exception Handlingassertcontext manager
0 likes · 4 min read

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.
Best PracticesException HandlingJava
0 likes · 6 min read

This article explains how to create a unified response class, define custom exception and error‑enum types, and implement a global exception handler in Spring Boot, enabling clean error handling, reduced boilerplate, and flexible business‑specific extensions.
AjaxResultError EnumGlobal Exception Handling
0 likes · 6 min read

This article explains how Dubbo 3.0’s Triple RPC protocol now supports custom exception serialization, detailing the original exception handling flow, the limitations of header‑based error transport, and the proposed TripleWrapper‑Protobuf solution for reliable client‑side error capture.
Java RPCTriple Protocolcloud-native
0 likes · 12 min read

This article walks through Spring Boot's default error mapping, shows how to return JSON for AJAX requests and HTML pages for browsers, and provides step‑by‑step code for creating custom exception classes, an error response entity, a Freemarker error template, and a global @ControllerAdvice handler with detailed configuration and testing examples.
Exception HandlingGlobal ExceptionJava
0 likes · 15 min read

This article explains Python exception propagation, demonstrates nested try blocks and function calls, shows how to define and raise custom exceptions, and illustrates re‑throwing exceptions within handlers, all backed by clear code examples and output screenshots.
Exception Handlingcustom-exceptionraise
0 likes · 6 min read

This tutorial explains how to define, implement, and throw custom Java exceptions, providing complete example code, step‑by‑step creation instructions, and a practical demo that integrates the custom exception into a JSON‑processing method.
Exception HandlingJavaProgramming Tutorial
0 likes · 4 min read

This article provides a comprehensive guide to Python exception handling, covering the concept of exceptions, common exception types, raising and re‑raising errors, using assert, the full try‑except‑else‑finally workflow, catching multiple exceptions, creating custom exception classes, retrieving exception information with as, and leveraging the traceback module for debugging.
Exception HandlingPythonTraceback
0 likes · 9 min read

This article explains how to design and implement robust Java exception handling for business systems using Spring MVC, covering when to create custom exceptions, how to structure service and controller code, and how to centralize error responses with @ControllerAdvice for clean, maintainable backend development.
@ControllerAdviceException HandlingJava
0 likes · 13 min read

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

This comprehensive guide explains Python exceptions, their types, how to raise and propagate them, use assert, try‑except‑else, try‑finally, custom exceptions, and traceback debugging, providing clear examples and visual illustrations for each concept.
Exception HandlingTracebackcustom-exception
0 likes · 9 min read
