Consider the following Scala code
def NOTImplementedIn[T<: AnyRef](t:T):String =
throw new Exception(t.getClass.getName+": Input type not implemented")
def NOTImplementedOut[T<: AnyRef](s:String):T =
throw new Exception("Output type not implemented")
In the first case, it is possible to infer the input type T. Is there any way to infer the output type T in the second case? I would like to include the type name in the exception.
Yes, using a
Manifest.