Fixed the error message, which was causing an error.
[profiler-torch.git] / profiler.lua
index 77398a0..4420af7 100644 (file)
@@ -64,7 +64,10 @@ function profiler.decorate(model, functionsToDecorate)
       -- save models anymore.
 
       if rawget(model, name) then
-         error('We decorate the class, not the objects, and there is a ' .. name .. ' in ' .. model)
+         error('We decorate the class, not the objects, and there is a `'
+                  .. name
+                  .. '\' function in '
+                  .. tostring(model))
       end
 
       local toDecorate = getmetatable(model)