JSFiddle - React, Tailwind, and code Playground

by listochkin

JavaScript

function noWrap() {
    try {
        var o = {}; o.nonexistingMethod();
    } catch (error) {
        throw error;
    }
}

function wrap() {
    try {
        var o = {}; o.nonexistingMethod();
    } catch (error) {
        throw new Error(error);
    }
}

try { 
    noWrap();
} catch (error) {
    console.log('No wrapping:');
    console.log(error.arguments);
    console.log(error.stack);
};
try {
    wrap();
} catch (error) {
    console.log('Wrapping:');
    console.log(error.arguments);
    console.log(error.stack);
};