track back when gotten invalid arguments in function

fixed issue:  http://cocos2d-x.org/issues/5568