Files
react/packages/react-devtools-shared/src/UnsupportedBridgeOperationError.js
Brian Vaughn e62a8d7545 Store throws a specific Error type (UnsupportedBridgeOperationError) (#24147)
When this Error type is detected, DevTools shows a custom error overlay with upgrade/downgrade instructions.
2022-03-23 17:04:54 -04:00

22 lines
584 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
export default class UnsupportedBridgeOperationError extends Error {
constructor(message: string) {
super(message);
// Maintains proper stack trace for where our error was thrown (only available on V8)
if (Error.captureStackTrace) {
Error.captureStackTrace(this, UnsupportedBridgeOperationError);
}
this.name = 'UnsupportedBridgeOperationError';
}
}