catching_josh 1.2.4
catching_josh: ^1.2.4 copied to clipboard
A Flutter package that makes try-catch operations elegant and customizable with clean error logging and flexible error handling options.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased] #
1.2.4 - 2025-12-24 #
1.2.3 - 2025-10-13 #
Added #
- Scoped Batch Logging:
JoshLogBuffernow supports scoped batch logging withbeginScope,endScope, andflushAllfor grouped log emission. - Pass-Through Logic: Chained
joshReq/joshAsynccalls now support pass-through forStandardResult/StandardResponseobjects. - Error Propagation Flags: Optional
rethrowOnErrorandattachOriginalErrorMessageflags for fine-grained error handling in core methods. - Unit Tests: Added tests for chaining, pass-through, and scoped logging behaviors.
Changed #
- Error Propagation: Improved error and log propagation in chained core calls; more predictable and robust handling.
- Documentation: Updated README with new usage examples and logging features.
Fixed #
- Test Reliability: Fixed test failures related to pass-through and batch logging edge cases.
1.2.2 - 2025-09-07 #
Added #
- Environment Utils: Centralized environment detection with
EnvironmentUtilsclass - Mock Data Support:
joshReqnow supports mock data fallback for testing - Development-Only Mock: Mock data only returned in development environments
- Single Log Line:
JoshLogger.singleLogLine()method for simple error message formatting
Changed #
- Code Refactoring: Removed duplicate
_isProductionlogic across logging classes - Simplified joshReq: Cleaner error handling with ternary operator
- Centralized Environment: All environment checks now use
EnvironmentUtils
Improved #
- Code Quality: Eliminated code duplication and improved maintainability
- Testing Support: Better mock data handling for development and testing
- Documentation: Updated comments to reflect new architecture
1.2.1 - 2025-09-04 #
Added #
- Dual Logging System:
JoshLogger(user-facing) +JoshLoggerInternal(internal batch) - Single Log Buffer:
JoshLogBufferfor efficient memory usage
Changed #
- Batch Logging: All handlers use
JoshLoggerInternalwith Core-controlled flushing - Production Optimization: Success logs disabled in production
Improved #
- Documentation: Clear comments explaining dual logging architecture
- Performance: Batch logging reduces console output overhead
1.2.0 - 2025-09-01 #
Changed #
- Simplified API: Removed complex ErrorHandleType enum and JoshException
- Streamlined Error Handling: Always return StandardResult/StandardResponse objects
- Unified Parameters: Consistent use of
logTitleparameter
Removed #
- ErrorHandleType Enum: Complex error handling strategies
- JoshException Class: Custom exception class
- Complex Error Logic: Simplified error handling
1.1.0 - 2025-08-28 #
Added #
- Enhanced Logging: Debug-mode only logging with
developer.log - Cache Management: Environment variable-based cache configuration
- Memory Monitoring: Accurate memory usage calculation
Improved #
- LogFormatter Performance: Enhanced caching system
- Error Handling: Better error logging with consistent format