Skip to content
  • deuce's avatar
    b2d7cf7e
    "Fix" problem as a result of the change to JSVAL_IS_NUM() · b2d7cf7e
    deuce authored
    Perviously, if the argument to a number of bbs.* functions was not a valid
    number, Synchronet would silently ignore the parameter and treat it as though
    it was not specified.
    
    The new behaviour was to use the value as a number.  However, the old code
    caused the exception triggered by an inability to convert the number to
    be pending until after the return (the JS_Native didn't return JS_FALSE) so
    a try/catch block aorund it would not catch the exception.
    
    The new new behaviour is to throw the exception immediately so it can be
    caught and handled correctly.
    b2d7cf7e
    "Fix" problem as a result of the change to JSVAL_IS_NUM()
    deuce authored
    Perviously, if the argument to a number of bbs.* functions was not a valid
    number, Synchronet would silently ignore the parameter and treat it as though
    it was not specified.
    
    The new behaviour was to use the value as a number.  However, the old code
    caused the exception triggered by an inability to convert the number to
    be pending until after the return (the JS_Native didn't return JS_FALSE) so
    a try/catch block aorund it would not catch the exception.
    
    The new new behaviour is to throw the exception immediately so it can be
    caught and handled correctly.
Loading