7 lines
156 B
JavaScript
7 lines
156 B
JavaScript
module.exports = function (exec) {
|
|
try {
|
|
return { error: false, value: exec() };
|
|
} catch (error) {
|
|
return { error: true, value: error };
|
|
}
|
|
};
|