Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

feat: provide better error messages on WindowsExceptions #291

Merged
merged 1 commit into from
Jul 5, 2023
Merged

Conversation

halildurmus
Copy link
Owner

Description

Takes advantage of the GetRestrictedErrorInfo and IRestrictedErrorInfo APIs to provide better error messages on WindowsExceptions.

For example:

import 'package:windows_system/windows_system.dart';

void main() async {
  await Launcher.launchUriAsync(Uri.parse('dartwinrt'));

  // Before:
  // Error 0x80070057: The parameter is incorrect.

  // After:
  // Error 0x80070057: dartwinrt is not a valid absolute URI.
}

Related Issue

Type of Change

  • feat -- New feature (non-breaking change which adds functionality)
  • 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 refactor -- Code refactor
  • ci -- Build configuration change
  • 📝 docs -- Documentation
  • 🧪 test -- Test
  • 🗑️ chore -- Chore

@halildurmus halildurmus added the type: feature New feature or request label Jul 5, 2023
@github-actions github-actions bot added pkg: windows_data The windows_data package pkg: windows_devices The windows_devices package pkg: windows_foundation The windows_foundation package pkg: windows_gaming The windows_gaming package pkg: windows_globalization The windows_globalization package pkg: windows_graphics The windows_graphics package pkg: windows_media The windows_media package pkg: windows_networking The windows_networking package pkg: windows_storage The windows_storage package pkg: windows_system The windows_system package pkg: windows_ui The windows_ui package pkg: winrtgen The winrtgen package pkg: windows_security The windows_security package pkg: windows_ai The windows_ai package pkg: windows_applicationmodel The windows_applicationmodel package labels Jul 5, 2023
@halildurmus halildurmus merged commit c06493c into main Jul 5, 2023
@halildurmus halildurmus deleted the throw branch July 5, 2023 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pkg: windows_ai The windows_ai package pkg: windows_applicationmodel The windows_applicationmodel package pkg: windows_data The windows_data package pkg: windows_devices The windows_devices package pkg: windows_foundation The windows_foundation package pkg: windows_gaming The windows_gaming package pkg: windows_globalization The windows_globalization package pkg: windows_graphics The windows_graphics package pkg: windows_media The windows_media package pkg: windows_networking The windows_networking package pkg: windows_security The windows_security package pkg: windows_storage The windows_storage package pkg: windows_system The windows_system package pkg: windows_ui The windows_ui package pkg: winrtgen The winrtgen package type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant