Skip to content

Conversation

tech-andgar
Copy link
Owner

@tech-andgar tech-andgar commented Mar 12, 2024

Overall, these changes primarily revolve around improving exception handling and string formatting versatility.

Changed - 2.0.2

  • Exception message handling has been improved for better readability wherein the handler now uses the string representation of exceptions.

  • String formatting logic in the CustomEquatable class has been improved to handle null and empty values more gracefully.

  • More descriptive messages in place of direct position to parameters of extends ExceptionState calls have been introduced. class DataXXXXXExceptionState<TModel> extends ExceptionState

    v1.x.x

    FailureState(
      DataNetworkExceptionState(
        NetworkException.noInternetConnection,
        StackTrace.current,
      ),
    ),

    v2.x.x

    FailureState(
      DataNetworkExceptionState(
        message: 'NetworkException.noInternetConnection',
        stackTrace: StackTrace.current,
    ),
    ),

Added - 2.0.2

  • More specific details about the exceptions including DioException information in the test cases for exception handling.
  • message to namedProps in DataHttpExceptionState for more detailed logging.

Fixed - 2.0.2

  • An issue with trailing commas in the output string of the CustomEquatable class.

Improved the string formatting logic in the CustomEquatable class. Now it handles null and empty values more gracefully, and also fixes a minor issue with trailing commas in the output string.
Updated the exception handler to use the string representation of exceptions for better readability. Also, added 'message' to namedProps in DataHttpExceptionState for more detailed logging.
Updated the test cases for exception handling. Enhanced the error messages to include more specific details about the exceptions, including DioException information. Also added new tests to handle null and non-null message scenarios in DataHttpExceptionState.
Updated the package version in both pubspec.lock and pubspec.yaml files from 2.0.1 to 2.0.2 for better dependency management and streamlined API handling.
@tech-andgar tech-andgar merged commit 8f52cad into main Mar 12, 2024
@tech-andgar tech-andgar deleted the fix_string branch March 12, 2024 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant