add variable class name in thrown exception