Skip to content

Instantly share code, notes, and snippets.

@p3t0r
Created March 14, 2011 22:00
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 p3t0r/869967 to your computer and use it in GitHub Desktop.
Save p3t0r/869967 to your computer and use it in GitHub Desktop.
val bfr = new BigFailRepository with Retrying[String]
println("failed result: " + bfr.withConnection {conn => Option("failure result")})
val sfr = new SmallFailRepository with Retrying[String]
println("success result: " + sfr.withConnection {conn => Option("should fail first, succeed later")})
val nfr = new NoFailRepository with Retrying[String]
println("success result: " + nfr.withConnection {conn => Option("should not fail result")})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment