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>
23 lines
No EOL
790 B
Text
23 lines
No EOL
790 B
Text
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
/**
|
|
* Represents an error that might become visible to the user. Where errors
|
|
* might be surfaced to the user (such as by displaying the message to the
|
|
* console), this class should be used to enforce that the message is
|
|
* localized on the way in.
|
|
*/
|
|
export class UserVisibleError extends Error {
|
|
message;
|
|
constructor(message) {
|
|
super(message);
|
|
this.message = message;
|
|
}
|
|
}
|
|
export function isUserVisibleError(error) {
|
|
if (typeof error === 'object' && error !== null) {
|
|
return error instanceof UserVisibleError;
|
|
}
|
|
return false;
|
|
}
|
|
//# sourceMappingURL=UserVisibleError.js.map |