Error handling has gradually evolved throughout the project and is no longer consistent. Different patterns are used for cleanup, ownership, and early returns, making the code harder to review and maintain.
This is a major overhaul across Cleaf. Adopting a single cleanup strategy and consistent ownership rules. Every function should have clear resource lifetimes, predictable cleanup paths, and uniform error reporting.
Error handling has gradually evolved throughout the project and is no longer consistent. Different patterns are used for cleanup, ownership, and early returns, making the code harder to review and maintain.
This is a major overhaul across Cleaf. Adopting a single cleanup strategy and consistent ownership rules. Every function should have clear resource lifetimes, predictable cleanup paths, and uniform error reporting.