Skip to content

Some error classes don't make sense in Dart2 #33949

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

Open
matanlurey opened this issue Jul 23, 2018 · 4 comments
Open

Some error classes don't make sense in Dart2 #33949

matanlurey opened this issue Jul 23, 2018 · 4 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. enhancement-breaking-change An enhancement which is breaking. library-core type-enhancement A request for a change that isn't a bug

Comments

@matanlurey
Copy link
Contributor

This is not exhaustive, and probably too late for Dart2, but maybe Dart3?

In addition, these three errors don't seem to ever... be used:

It might make sense to make them private, I don't know if anyone ever tries to catch these?

@vsmenon vsmenon added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core labels Jul 23, 2018
@lrhn
Copy link
Member

lrhn commented Jul 26, 2018

The CyclicInstantantiationError can still happen. It's used for lazily initialized static fieds.

The AbstractClassInstantiationError is obsolete. I think FallThroughError is too.

Seems like a good time to introduce a deprecation policy, so we can deprecate them and remove them in Dart 3.

@bkonyi
Copy link
Contributor

bkonyi commented Jul 27, 2018

Not sure what you mean by "don't seem to ever be used" for the last three. I'm fairly certain that the VM is more than happy to throw those exceptions.

@matanlurey
Copy link
Contributor Author

@bkonyi:

Not sure what you mean by "don't seem to ever be used" for the last three

Rather, users do not ever try to catch them or use them as types. They might make sense to make private and no longer export via dart:core, as it adds additional mental overhead to navigating the API docs and auto-complete for all Dart files but doesn't seem to be particularly useful.

@lrhn lrhn added enhancement-breaking-change An enhancement which is breaking. type-enhancement A request for a change that isn't a bug labels Oct 2, 2020
@lrhn
Copy link
Member

lrhn commented Oct 2, 2020

See also #34233.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. enhancement-breaking-change An enhancement which is breaking. library-core type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants