Rocky_Mountain_Vending/.pnpm-store/v10/files/95/218f5d22676b004301f5e83f8797e8547b6a1a8ac4f44f6ca6cd16b87f41831b08b48ea74b35e1a5825318d4f11ff2394183c38cbebcebd755c094016c7135
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

40 lines
No EOL
1.7 KiB
Text

import { eventErrorThrown } from '../../../telemetry/events';
import { traceGlobals } from '../../../trace/shared';
/**
* An error caused by a bug in Turbopack, and not the user's code (e.g. a Rust panic). These should
* be written to a log file and details should not be shown to the user.
*
* These are constructed in Turbopack by calling `throwTurbopackInternalError`.
*/ export class TurbopackInternalError extends Error {
constructor({ message, anonymizedLocation }){
super(message), this.name = 'TurbopackInternalError', // Manually set this as this isn't statically determinable
this.__NEXT_ERROR_CODE = 'TurbopackInternalError';
this.location = anonymizedLocation;
}
}
/**
* A helper used by the napi Rust entrypoints to construct and throw a `TurbopackInternalError`.
*
* When called, this will emit a telemetry event.
*/ export function throwTurbopackInternalError(conversionError, opts) {
if (conversionError != null) {
// Somehow napi failed to convert `opts` to a JS object??? Just give up and throw that instead.
throw Object.defineProperty(new Error('NAPI type conversion error in throwTurbopackInternalError', {
cause: conversionError
}), "__NEXT_ERROR_CODE", {
value: "E723",
enumerable: false,
configurable: true
});
}
const err = new TurbopackInternalError(opts);
const telemetry = traceGlobals.get('telemetry');
if (telemetry) {
telemetry.record(eventErrorThrown(err, opts.anonymizedLocation));
} else {
console.error('Expected `telemetry` to be set in globals');
}
throw err;
}
//# sourceMappingURL=internal-error.js.map