Exceptions and the ClientCallPoint Argument
The functions in these resources throw only objects of JavaScript's native Error type.
This type has a message member, for which the functions in these libraries provide a
detailed text string that describes the nature of the problem.
In line with this, a great proportion of the functions contained in these libraries accept an argument called
ClientCallPoint. This parameter is always optional, and is always the trailing argument in
any call-signature (meaning that, should you choose to use it, you may need to provide dummy parameters for any leading
arguments).
To the functions concerned, it is a 'tramp variable' in that none of them actually use it, but simply incorporate it into the
message member of any Error objects that are thrown. It
can take any value but, if used, is at its most useful when it contains information describing the conditions under which the
function was called, such as the location of the call in a given body of code.
For example in the following call to FindIn (the object-member finder), the second parameter
stipulates the name of the member that the function should search for, and should be enclosed in quotes:
FindIn (MyObj, MyMember, null, 3, "MyLib.js - Line 42");
However, this will generate an Error object that will be thrown out of
FindIn's scope, and whose message member will contain the
following:
Error in call to FindIn - SearchTerms argument is not
a string. Client-code call point: MyLib.js - Line 42