Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
fix code style. i put this in the code review but it was ignored.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robey Pointer committed Oct 20, 2010
1 parent 4d252ad commit bc61996
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/scala/com/twitter/flockdb/EdgesService.scala
Expand Up @@ -20,7 +20,7 @@ import com.twitter.gizzard.Future
import com.twitter.gizzard.jobs.CopyFactory
import com.twitter.gizzard.nameserver.NameServer
import com.twitter.gizzard.scheduler.PrioritizingJobScheduler
import com.twitter.gizzard.shards.ShardBlackHoleException
import com.twitter.gizzard.shards.{ShardBlackHoleException, ShardDatabaseTimeoutException, ShardTimeoutException}
import com.twitter.gizzard.thrift.conversions.Sequences._
import com.twitter.results.{Cursor, ResultWindow}
import operations.{ExecuteOperations, SelectOperation}
Expand Down Expand Up @@ -106,7 +106,7 @@ class EdgesService(val nameServer: NameServer[shards.Shard],
}
}
}

private def countAndRethrow(e: Throwable) = {
Stats.incr(e.getClass.getName)
throw(new FlockException(e.getMessage))
Expand All @@ -116,17 +116,17 @@ class EdgesService(val nameServer: NameServer[shards.Shard],
try {
block
} catch {
case e: FlockException => {
case e: FlockException =>
Stats.incr(e.getClass.getName)
throw(e)
}
case e: com.twitter.gizzard.shards.ShardTimeoutException => countAndRethrow(e)
case e: com.twitter.gizzard.shards.ShardDatabaseTimeoutException => countAndRethrow(e)
case e: Throwable => {
case e: ShardTimeoutException =>
countAndRethrow(e)
case e: ShardDatabaseTimeoutException =>
countAndRethrow(e)
case e: Throwable =>
Stats.incr("unknown-exceptions")
log.error(e, "Unhandled error in EdgesService")
throw(new FlockException(e.getMessage))
}
}
}
}

0 comments on commit bc61996

Please sign in to comment.