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

kintsugi: Handle expected errors gracefully. #31

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

byohay
Copy link
Collaborator

@byohay byohay commented Dec 15, 2021

Instead of printing the stack trace, just print the errors.

@byohay byohay force-pushed the feature/handle-errors-gracefully branch 4 times, most recently from 98329f8 to fdf500a Compare December 15, 2021 16:26
# frozen_string_literal: true

module Kintsugi
class EnvironmentError < RuntimeError

Choose a reason for hiding this comment

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

document

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed EnvironmentError

class EnvironmentError < RuntimeError
end

class MergeError < RuntimeError

Choose a reason for hiding this comment

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

document

@byohay byohay force-pushed the feature/handle-errors-gracefully branch from fdf500a to b949db5 Compare December 16, 2021 10:12
@byohay
Copy link
Collaborator Author

byohay commented Dec 16, 2021

@ashdnazg squashed.

Copy link

@ashdnazg ashdnazg left a comment

Choose a reason for hiding this comment

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

F&S&M

lib/kintsugi.rb Outdated
# @raise [RuntimeError]
# If no rebase, cherry-pick, or merge is in progress, or the project file couldn't be
# opened, or there was an error applying the change to the project.
# @raise [EnvironmentError]

Choose a reason for hiding this comment

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

Suggested change
# @raise [EnvironmentError]
# @raise [ArgumentError]

Instead of printing the stack trace, just print the errors.
@byohay byohay force-pushed the feature/handle-errors-gracefully branch from b949db5 to 33023b8 Compare December 16, 2021 11:05
@byohay byohay merged commit beaee2e into Lightricks:main Dec 16, 2021
@byohay byohay deleted the feature/handle-errors-gracefully branch December 16, 2021 11:51
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

Successfully merging this pull request may close these issues.

2 participants