Writing customized exception, I want to include the name of a var used as 
an argument in the caller of the function generating the exception.
I saw similiar access from a function once, and am unable to re-locate 
that.  thanks.

function caller(potato::Int)
    called(potato)
end

function called(tally::Int)
   if tally>16
     throw(TooMany, "$(tally) is way too many")
  elseif tally>4
     throw(TooMany, "$(tally) is a few more than expected.")
  end
  true
end

caller(22)
  Error.. "caller(potato=22) is way too many" .. in (the usual)




Reply via email to