verdnatura-chat/app/lib/methods/helpers/protectedFunction.js

8 lines
101 B
JavaScript

export default fn => (...params) => {
try {
fn(...params);
} catch (e) {
console.log(e);
}
};