Skip to content

Instantly share code, notes, and snippets.

@gregblake
Created December 6, 2021 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregblake/c656d2755d82e1d216f7b11ced6e58c5 to your computer and use it in GitHub Desktop.
Save gregblake/c656d2755d82e1d216f7b11ced6e58c5 to your computer and use it in GitHub Desktop.
Error Catching
def new_query(params, current_user)
begin
# existing code from `new_query`
rescue ActiveRecord::StatementInvalid => e
binding.pry
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment