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

6807 add exit codes to setup session.rb #160

Merged
merged 8 commits into from Apr 12, 2016

Conversation

kilfat
Copy link
Contributor

@kilfat kilfat commented Mar 29, 2016

Raise if don't exist directory\files and rescue shell - errors.
P.S. File exists maybe not work.

exit_code = $?.exitstatus
raise "failed command: #{shell}" unless exit_code==0

rescue Exception => error
Copy link
Contributor

Choose a reason for hiding this comment

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

Your raise is caught with rescue and is not really thrown. Is it supposed to be so? Application will not return 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It supposed for this, because it is working in cycle, and maybe will be some exceptions at setup, which will not be reason to exit from cycle.


puts "#{shellCommand}\n"
# just one soft exeption - box already exist
if shellCommand[/attempting to add already exists/]==nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to check if $? != 0

@zmm zmm merged commit 55b75f1 into integration Apr 12, 2016
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.

None yet

3 participants