Skip to content
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

Remove the Result object in favor of throwing exceptions #1238

Closed
Gerrit0 opened this issue Mar 18, 2020 · 0 comments
Closed

Remove the Result object in favor of throwing exceptions #1238

Gerrit0 opened this issue Mar 18, 2020 · 0 comments

Comments

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 18, 2020

As much as I love Rust's Result type, to use it effectively requires that it is always used. If a function returns a Result<T, E>, the caller of said function must use the result of that function. If they fail to do this, then any errors are silently ignored.

TypeDoc's Result type suffers from this problem. A cursory search didn't turn up any simple way to add a lint rule requiring that it be used, so we need to move back to standard exceptions. This was the cause of #1237.

This should be a relatively simple change. Delete result.ts, see what TS yells about, then switch to returning values directly.

@Gerrit0 Gerrit0 added help wanted Contributions are especially encouraged good first issue Easier issue for first time contributors code health and removed good first issue Easier issue for first time contributors help wanted Contributions are especially encouraged labels Mar 18, 2020
Gerrit0 added a commit that referenced this issue Mar 22, 2020
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

No branches or pull requests

1 participant