godotengine / webrtc-native

The official GDNative WebRTC implementation for non-html exports.
MIT License
198 stars 27 forks source link

catch ice invalid url error #145

Open tlloancy opened 2 months ago

tlloancy commented 2 months ago

Godot version

4.2.2

Plugin version

0.2

System information

Windows 10

Issue description

icescrenne

HELLO, I would like to be able to catch the error displayed after what(), for user information purpose. Is that possible ? [Edit] The Goal is to keep more track on steps and status of ice connections, for both dev and UI purpose

Steps to reproduce

my programm let the user choose his ice server. I'd like to inform him for any error like this one, where his url input is invalid

Minimal reproduction project

invoke ice server iceserverconfiguration
### Tasks
Faless commented 2 months ago

@tlloancy can you please upload a minimum reproduction project? The screenshot you shared is not really an MRP, it's only part of the code, it can't be run, and people are not gonna copy your script from an image to test it.

Faless commented 2 months ago

Plugin version

0.2

Also, please try updating to the latest version of the plugin: 1.0.6

Faless commented 2 months ago

As you can see, we already catch the error in the latest version: https://github.com/godotengine/webrtc-native/blob/1.0.6-stable/src/WebRTCLibPeerConnection.cpp#L260-L272

tlloancy commented 2 months ago

Hi, i know the error is correctly raised in webrtc as you can see in the first screenshot, but i would like to be able to catch that error at my app level in order to display the information as well as avoid crashing the app. i dont know how i am doing that. Thx