-
Notifications
You must be signed in to change notification settings - Fork 283
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
Add plain ruby docs #374
Add plain ruby docs #374
Conversation
run_script ARGV | ||
|
||
Rollbar.info "Script ran successfully" | ||
rescue Exception => e |
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.
Since rescuing Exception
is a bad practice, let's remove it.
You can do just rescue => e
here.
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.
http://stackoverflow.com/a/10048406/456188
Better yet, let's rethrow afterward
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.
👍
@jondeandres Fixed |
end | ||
|
||
begin | ||
Rollbar.debug "Running Script" |
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.
@Crisfole I think that conceptually we should left the the .debug()
and .info()
calls outside the begin/rescue
block.
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.
done
@jondeandres Should be good to go. |
require 'rollbar' | ||
|
||
Rollbar.configure do |config| | ||
config.access_token = "SERVER_POST_ACCESS_TOKEN" |
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 should be "POST_SERVER_ITEM_ACCESS_TOKEN" to be consistent with the rest of this file (and work with the replacements that happen in our logged-in site)
Document how to use Rollbar without Rack or Rails