0

I have the following wrapper:

def ProtectedAction[T](f: => T)(implicit user: User): T = {
    if(isAuthorized()) f
    else { 
        Logger.warn(user.login + "Had access denied to" + methodsName)
        throw new NotAuthorizedException("You do not have permission to execute this operation.")
    }
}

I'd like to get the simpleName of the method wich is being held by f. How can I do that?

RafaelTSCS
  • 1,234
  • 2
  • 15
  • 36

0 Answers0