Rocky_Mountain_Vending/.pnpm-store/v10/files/e8/d0afe684e8bfdd0ce021a72f41dbf3034563b731fa3e3d1a3226601120082d079b1fa628bb2546ae1391ffc2a439447f5c6e2d954d25797bcd1182ae3dcd60
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

53 lines
1.4 KiB
Text

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const worldwide = require('../utils/worldwide.js');
const handlers = require('./handlers.js');
let _oldOnErrorHandler = null;
/**
* Add an instrumentation handler for when an error is captured by the global error handler.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
function addGlobalErrorInstrumentationHandler(handler) {
const type = 'error';
handlers.addHandler(type, handler);
handlers.maybeInstrument(type, instrumentError);
}
function instrumentError() {
_oldOnErrorHandler = worldwide.GLOBAL_OBJ.onerror;
// Note: The reason we are doing window.onerror instead of window.addEventListener('error')
// is that we are using this handler in the Loader Script, to handle buffered errors consistently
worldwide.GLOBAL_OBJ.onerror = function (
msg,
url,
line,
column,
error,
) {
const handlerData = {
column,
error,
line,
msg,
url,
};
handlers.triggerHandlers('error', handlerData);
if (_oldOnErrorHandler) {
// eslint-disable-next-line prefer-rest-params
return _oldOnErrorHandler.apply(this, arguments);
}
return false;
};
worldwide.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;
}
exports.addGlobalErrorInstrumentationHandler = addGlobalErrorInstrumentationHandler;
//# sourceMappingURL=globalError.js.map