Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js wrap a function pass parameters to function

var makeSafe = function(fn){
  return function(){
    try{
      return fn.apply(this, arguments);
    }catch(ex){
      ErrorHandler.Exception(ex);
    }
  };
};
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #wrap #function #pass #parameters #function
ADD COMMENT
Topic
Name
1+1 =