Hi I wrote a pretty big framework for quantopian use, and one of those wraps the record() method.
I'd like to show a user-friendly error when someone tries to record() a non-numerical value. (currently the backtest crashes with no useful info)
I can raise an exception for the user, but how can I inform the user of the method calling my wrapper?
For example:
def record(this, name,value):
if maths.isNumber(value)==False:
raise Exception("the value you are attempting to record is not a number. value={0}".format(value))
record(**{name:value})