-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
lib: Rewrite "credentials" as a TypeScript class #21461
base: main
Are you sure you want to change the base?
Conversation
So that we can do "if (err instanceof cockpit.ProcessError)" in catch clauses.
2f73b05
to
b3af36e
Compare
This requires its users to treat it as a class and not pass around divorced methods.
b3af36e
to
2025537
Compare
@@ -198,25 +229,29 @@ function Keys() { | |||
try { | |||
await proc; | |||
} catch (ex) { | |||
if (ex.exit_status) | |||
if (ex instanceof cockpit.ProcessError && ex.exit_status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
ex = new KeyLoadError(sent_password, failure); | ||
else if (error instanceof Error) | ||
ex = new KeyLoadError(sent_password, error.message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 3 added lines are not executed by any test.
else if (error instanceof Error) | ||
ex = new KeyLoadError(sent_password, error.message); | ||
else | ||
ex = error; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
No description provided.