Closed RobertBrunhage closed 3 months ago
in the current architecture, LinkException cannot be sealed because various link implementations (which are in different packages, e.g. gql_http_link, gql_dio_link, gql_websocket_link) use different implementations of exceptions which might attack more information on what happened.
Got it, will close this then!
If LinkException would use a
sealed
class then we would be enforced to handle/decide not to handle, different exceptions.Right now I go in to the source code to see what I want to handle, such as
HttpLinkParserException
etchttps://github.com/gql-dart/gql/blob/03186c82bd6c57785291b8346db6a5ae9008c47d/links/gql_link/lib/src/exceptions.dart#L5-L18
Not sure if there are technical limitations for why this is not the case or if it just hasn't been updated, wanted to make the ticket either way!