Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added an example with error logging to README

  • Loading branch information...
commit 8582f9bbe70ddcea3b23dd17e926e34e6bed14e3 1 parent 2ef6fa6
@gshutler authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 README.md
View
10 README.md
@@ -48,6 +48,16 @@ class Foo
def work
log.info { 'Doing some work' }
end
+
+ def dangerous_work
+ log.info { 'Attempting dangerous work' }
+ attempt_dangerous_work
+ log.info { 'Dangerous work complete' }
+ true
+ rescue => e
+ log.error "Dangerous work failed - #{e.message}", e
+ false
+ end
end
```
Please sign in to comment.
Something went wrong with that request. Please try again.