-
Notifications
You must be signed in to change notification settings - Fork 275
Cannot catch SocketException thrown when sending GRPC request #396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't seem to be able to reproduce this. I see error correctly propagate. I have tried reproducing this using
Could you provide the full runnable reproduction for the problem? |
@mraleph Thanks a lot for your help. I'm sorry for not responding earlier; it turns out I had email notifications turned off. I've downloaded the hello world example and tried to reproduce it, and it turns out the issue does not occur when I run dart from the command line directly, but it does occur when I run dart using VS code. In VS Code, if I untick the checkbox It seems like VS Code is marking this as an "Uncaught exception", although it is clearly caught. Could this issue be due to the way grpc-dart handles errors, or should I contact VS Code? |
It looks a problem in VS Code / Dart itself: |
Thanks for the context! I would imagine that even when "Uncaught Exceptions" check box is ticked you should be able to resume execution - after which exception should be caught in the right place. I have pinged dart-lang/sdk#37953 (which is the upstream Dart bug tracking improvements in "pause on unhandled exceptions" functionality). Let's see what we can do about it. |
Excellent, thanks a lot! |
When my GRPC server is unavailable, a
SocketException
is thrown in thehttp2_connection.dart
file when I make a GRPC call; I appear to be unable to catch the error.grpc-dart: 2.7.0
Repro steps
Expected result: printing 'onError'
Actual result:
on this line:
grpc-dart/lib/src/client/http2_connection.dart
Line 311 in 5b3a125
Thanks for your help!
The text was updated successfully, but these errors were encountered: