Skip to content

Fixed type reader/converter parsing exception#3084

Merged
Misha-133 merged 1 commit intodiscord-net:devfrom
Suiram1701:dev
Mar 28, 2025
Merged

Fixed type reader/converter parsing exception#3084
Misha-133 merged 1 commit intodiscord-net:devfrom
Suiram1701:dev

Conversation

@Suiram1701
Copy link
Contributor

@Suiram1701 Suiram1701 commented Mar 20, 2025

Description

The default value reader/converter only catch for InvalidCastExceptions but not for FormatExceptions which will be thrown if Convert.ChangeType can't parse the provided value.
This causes InteractionService.ExecuteAsync to return an ExecuteResult instead of a TypeConverterResult when invalid values were provided.

Changes

Catches also FormatExceptions on every use of Convert.ChangeType.

Related Issues

N/A

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.

2 participants