Skip to content

Conversation

@olehermanse
Copy link
Member

@olehermanse olehermanse commented Jul 3, 2025

No description provided.

@olehermanse olehermanse added the WIP Work in progress label Jul 3, 2025
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
@olehermanse olehermanse force-pushed the replace_more branch 2 times, most recently from 7403806 to c8ed5f4 Compare July 3, 2025 16:03
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
There are a few reasons for doing this:
- Makes it possible to catch this exception.
- Makes it possible for tools to know what return types a function
  return. Before this, things like PyRight aren't able to deduce that
  the function "stops" at user_error().
- Same argument could be made for making it easier for humans to read.
- Make it possible to handle this error in one centralized place along
  with the other error types, in main().

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
This is a more honest name, given that we've been using this everywhere,
even for things which are not the user's fault.

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
@olehermanse olehermanse force-pushed the replace_more branch 2 times, most recently from a9ef5e8 to 1aad5c0 Compare July 3, 2025 17:14
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Maybe you can squash some of the commits

@olehermanse olehermanse merged commit 3118a39 into cfengine:master Jul 4, 2025
11 checks passed
@olehermanse olehermanse deleted the replace_more branch July 4, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants