babludcv / trimpath

Automatically exported from code.google.com/p/trimpath
0 stars 0 forks source link

If context is a string message isn't very clear. #21

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. TrimPath.processDOMTemplate("someNodeId", "some string");

What is the expected output? What do you see instead?
You get: context._MODIFIERS is undefined in the javascript console.
It would be nice if you got a better error (exception?).

What version of the product are you using? On what operating system?
trimpath-template-1.0.38

Please provide any additional information below.
You could add something like this to TrimPath.parseTemplate_etc.Template
            if (typeof context != "object")
                throw "Context must be an object but is an "+ typeof context;

Original issue reported on code.google.com by buck...@gmail.com on 22 Jan 2009 at 4:48