exceptionMarker

nl.grons.metrics4.scala.Meter.exceptionMarker

Gives a marker that runs f, marks the meter on an exception, and returns result of f.

Example usage:

 class Example(val db: Db) extends Instrumented {
   private[this] val loadExceptionMeter = metrics.meter("load").exceptionMarker

   def load(id: Long) = loadExceptionMeter {
     db.load(id)
   }
 }

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[A](f: => A): A