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>
28 lines
No EOL
750 B
Text
28 lines
No EOL
750 B
Text
import { config } from '../config';
|
|
var context = null;
|
|
export function errorContext(cb) {
|
|
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
var isRoot = !context;
|
|
if (isRoot) {
|
|
context = { errorThrown: false, error: null };
|
|
}
|
|
cb();
|
|
if (isRoot) {
|
|
var _a = context, errorThrown = _a.errorThrown, error = _a.error;
|
|
context = null;
|
|
if (errorThrown) {
|
|
throw error;
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
cb();
|
|
}
|
|
}
|
|
export function captureError(err) {
|
|
if (config.useDeprecatedSynchronousErrorHandling && context) {
|
|
context.errorThrown = true;
|
|
context.error = err;
|
|
}
|
|
}
|
|
//# sourceMappingURL=errorContext.js.map |