mozilla
Your Search Results

    util/deprecate

    Experimental

    Functions to deprecate code.

    Globals

    Functions

    deprecateFunction(fun, msg)

    Dump to the console the error message given in the second argument, prefixed with "DEPRECATED:", and print the stacktrace; then execute the function passed as first argument and returns its value.

    It does not raise an exception, but just displays the error message and continues to execute the function.

    This function is mostly used to flag usage of deprecated functions, that are still available but which we intend to remove in a future release.

    Parameters

    fun : function
    The function to execute after the error message

    msg : string
    The error message to display

    Returns

    * : The returned value from fun

    deprecateUsage(msg)

    Dump to the console the error message given, prefixed with "DEPRECATED:", and print the stacktrace.

    It does not raise an exception, but just displays the error message and returns.

    This function is mostly used to flag usage of deprecated functions that are no longer available.

    Parameters

    msg : string
    The error message to display

    Document Tags and Contributors

    Contributors to this page: wbamberg, jsantell
    Last updated by: wbamberg,
    Hide Sidebar